可学答题网 > 问答 > SCJP程序员认证考试题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

Given the command line


Given the command line java Pass2 and:  public class Pass2 {  public void main(String [] args) {  int x=6;  Pass2 p = new Pass2();  p.doStuff(x);  System.out.print(” main x = “+ x); }  void doStuff(int x) {  System.out.print(” doStuffx = “+ x++);  }  }  What is the result?() 

  • A Compilation fails.
  • B An exception is thrown at runtime.
  • C doStuffx = 6 main x = 6
  • D doStuffx = 6 main x = 7
  • E doStuffx = 7 main x = 6
  • F doStuffx = 7 main x = 7
参考答案
参考解析:
分类:SCJP程序员认证考试题库
相关推荐

1、and the command line:

and the command line:  java -Dprop.custom=gobstopper Commander  Which two, placed on line 13...

2、Given: When line 14 i

Given:When line 14 is reached, how many objects are eligible for the garbage collector?()A0B1C2D3E4

3、Given: When line 15 i

Given:When line 15 is reached, how many objects are eligible for the garbage collector?()A0B1C2D3E4

4、Which command line in

Which command line invocation will produce the output?()A java Test 2222B java Test 1234C java Test 4242D java Test 4321

5、And the command-line 

And the command-line invocations:  javac Pass2.java  java Pass2 5  What is the result?(...

6、Given: Which line of 

Given:Which line of code marks the earliest point that an object referenced by intObj becomes&...