试题详情
- 单项选择题 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
- D
关注下方微信公众号,在线模考后查看
热门试题