JAVA题库:格林模拟试题二(下)3
来源:优易学  2010-1-15 11:39:09   【优易学:中国教育考试门户网】   资料下载   IT书店

Question 44)
Which of the following statements are true
1) An inner class may be defined as static
2) There are NO circumstances where an inner class may be defined as private
3) A programmer may only provide one constructor for an anonymous class
4) An inner class may extend another class

Question 45)
What will happen when you attempt to compile and run the following code
int Output=10;boolean b1 = false;if((b1==true) && ((Output+=10)==20)){    System.out.println("We are equal "+Output);    }else    {    System.out.println("Not equal! "+Output);}
1) Compile error, attempting to peform binary comparison on logical data type
2) Compilation and output of "We are equal 10"
3) Compilation and output of "Not equal! 20"
4) Compilation and output of "Not equal! 10"

Question 46)
Given the following variables which of the following lines will compile without error?
String s = "Hello";long l = 99;double d = 1.11;int i = 1;int j = 0;1) j= i <2) j= i<3) j=i<4)j=i<

Question 47)
What will be output by the following line of code?
System.out.println(010|4);
1) 14
2) 0
3) 6
4) 12

[1] [2] 下一页

责任编辑:cyth

文章搜索:
 相关文章
热点资讯
资讯快报
热门课程培训