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

public class test (&en


public class test (   private static int j = 0;     private static boolean methodB(int k) (  j += k;    return true;   )    public static void methodA(int i) {    boolean b:   b = i < 10  methodB (4);    b = i < 10  methodB (8);   )     public static void main (String args) } (    methodA (0);  system.out.printIn(j);   )    )   What is the result?()  

  • A The program prints “0”
  • B The program prints “4”
  • C The program prints “8”
  • D The program prints “12”
  • E The code does not complete.
参考答案
参考解析:
分类:SCJP程序员认证考试题库
相关推荐

1、public class test( &en

public&ensp;class&ensp;test(&ensp;&ensp;&ensp;public&ensp;int&ensp;aMethod()[&ensp;&ensp;static&ensp;int&ensp;i=0;&ensp;&ensp;i++;&ensp;&ensp;return&ensp;I;&en...

2、Public class test (&en

Public&ensp;class&ensp;test&ensp;(&ensp;Public&ensp;static&ensp;void&ensp;stringReplace&ensp;(String&ensp;text)&ensp;&ensp;(&ensp;Text&ensp;=&ensp;text.replace&e...

3、public class Test {&en

public&ensp;class&ensp;Test&ensp;{&ensp;public&ensp;static&ensp;void&ensp;main(String&ensp;[]&ensp;args)&ensp;{&ensp;System.out.println(args.length&ensp;>&ensp;4&...

4、Public class test (&en

Public&ensp;class&ensp;test&ensp;(&ensp;Public&ensp;static&ensp;void&ensp;stringReplace&ensp;(String&ensp;text)&ensp;&ensp;(&ensp;Text&ensp;=&ensp;text.replace&e...

5、public class Test {&en

public&ensp;class&ensp;Test&ensp;{&ensp;private&ensp;static&ensp;float[]&ensp;f&ensp;=&ensp;new&ensp;float[2];&ensp;public&ensp;static&ensp;void&ensp;main(String&e...

6、public class Test {&en

public&ensp;class&ensp;Test&ensp;{&ensp;public&ensp;int&ensp;aMethod()&ensp;{&ensp;static&ensp;int&ensp;i&ensp;=&ensp;0;&ensp;i++;&ensp;return&ensp;i;&ensp;}&en...