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

时间:2022-08-30 18:35:00 所属题库:Java认证考试综合练习题库

相似题目