当前位置:SCJP程序员认证考试题库

问题:

[单选]

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

在进行居住的决策时,选择租房的优点是() 迁徙自由度较大。 保值,能够对抗通胀。 满足拥有房产的心理效用。 强迫储蓄积累财富。 以“扫胡尘、靖国难”为生平志事的诗人是()。 陆游。 杨万里。 杜甫。 王昌龄。 我国股份公司在海外发行上市流通的普通股股票称为() A股。 B股。 H股。 F股。 简论初中阅读教学在语文教学中的地位。 设置字体大小时,选择"无",代表() 3号字。 4号字。 5号字。 6号字。

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?() 

参考答案:

  参考解析

本题暂无解析

在线 客服