可学答题网 > 问答 > Java程序设计题库,初级程序员题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

现有:class Test2 fpublic static void m


现有:class Test2 fpublic static void main (String [] args) {short a,b,C;a=1;b=2;C=a+b;a+=2;}}以上代码中,哪一句是错误的?()

  • Aa=1;
  • BC=a+b;
  • Ca+=2;
  • Dshorta,b,C;
参考答案
参考解析:
分类: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 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...

3、现有: 1. class Wrench f 2.public static

现有:1. class Wrench f2.public static void main(String [] args) {3.Wrench w=new Wrench(); Wrench w2=new Wrench();4. w2=go (w, w2);5.System.out.pr...

4、11. public static void

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

5、现有:  class Test2 &ensp

现有: class Test2  f public static void main (String  []  args)  {   &en...

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