單項選擇題

public class Pass{
public static void main(String[]args){
int x=5;
Pass p=new Pass();
p.doStuff(x);
System.out.print("mainx="+x);
}
void doStuff(intx){
System.out.print("doStuffx="+x++);
}
}
What is the result?()

A.Compilation fails.
B.An exception is thrown at runtime.
C.doStuff x=6 main x=6
D.doStuff x=5 main x=5
E.doStuff x=5 main x=6
F.doStuff x=6 main x=5

微信掃碼免費搜題