單項選擇題

class TestReference{  
public static void main(String[] args){  
int x=2;  
TestReference tr = new TestReference();  
System.out.print(x);  
tr.change(x);  
System.out.print(x);  }  
public void change(int num){  
num = num + 1;  }  }  
程序運行后的輸出是哪項()?  

A. 23
B. 21
C. 22
D. 編譯錯誤

微信掃碼免費搜題