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

1.public class Test{ 2.int x=12; 3.pu


1.public class Test{ 2.int x=12; 3.public void method(intx){ 4.x+=x; 5.System.out.println(x); 6.} 7.} Given: 34.Test t=new Test(); 35.t.method(5); What is the output from line 5 of the Test class?()

  • A5
  • B10
  • C12
  • D17
  • E24
参考答案
参考解析:
分类:Java认证考试综合练习题库
相关推荐

1、public class test( &en

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

2、下列语句输出结果为( )。 public class test { publ

下列语句输出结果为( )。 public class test { public static void main(String args[]) String s1 =newString("HOW"); String s2=newString("How"): System.out.pnntln(!(s1.equals(s2))); } }A假B真C0D1

3、1.public class Test {&

1.public class Test { 2.public static void main (String args[]) { 3.class Foo { 4.public&ensp...

4、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.pr...

5、1. class Test { 

1. class Test { 2. private Demo d; 3. void start() { 4. d = new Demo(); 5....

6、阅读下列代码: public class Test2005{ public

阅读下列代码: public class Test2005{ public static void main(String args[]){ System.out.pdntln((3>2)?4:5); } } 其运行结果是( )。A2B3C4D5