public class Pass{<br /> public static void main(String[]args){<br /> int x=5;<br /> Pass p=new Pass();<br /> p.doStuff(x);<br /> System.out.print("mainx="+x);<br /> }<br /> void doStuff(intx){<br /> System.out.print("doStuffx="+x++);<br /> }<br /> }<br /> What is the result?()<p> public class Pass{<br /> public static void main(String[]args){<br /> int x=5;<br /> Pass p=new Pass();<br /> p.doStuff(x);<br /> System.out.print("mainx="+x);<br /> }<br /> void doStuff(intx){<br /> System.out.print("doStuffx="+x++);<br /> }<br /> }<br /> What is the result?()</p>
A、A.Compilation fails.
B、B.An exception is thrown at runtime.
C、C.doStuff x=6 main x=6
D、D.doStuff x=5 main x=5
E、E.doStuff x=5 main x=6
F、F.doStuff x=6 main x=5