可学答题网 > 问答 > Java认证考试综合练习题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

public class Test{ public static void


public class Test{ public static void main(String[]args){ intx=5; boolean b1=true; boolean b2=false; if((x==4)&&!b2) System.out.print("l"); System.out.print("2"); if((b2=true)&&b1) System.out.print("3"); } } What is the result?()

  • A2
  • B3
  • C12
  • D23
  • E123
  • FCompilation fails.
  • GAn exceptional ist hrown at runtime.
参考答案
参考解析:
分类:Java认证考试综合练习题库
相关推荐

1、public class Pass{ public static void

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...

2、public static void mai

public static void main(String[] args) { String str = null‟; if (str == null) {&ensp...

3、11. public static void

11. public static void main(String[] args) { 12. Integer i = uew Integer(1) + new Inte...

4、11. public static void

11. public static void test(String str) { 12. if(str == null  str.lellgth() == 0) {&...

5、public static void main(String[]args)

public static void main(String[]args){Integer i=new Integer(1)+new Integer(2);switch(i){case3:System.out.println("three");break;default:System.o...

6、现有: class TestApp{ public static void

现有:class TestApp{public static void main (String[] args){for (int i=0; iA0123B012456789C0123456789D012