单项选择题
现有: class WhileTests { public static void main (String [] args) { int X=5; while (++x<4) { --x; } System.out.println( "x="+x); } } 结果是什么?()
A.X=6 B.X=5 C.X=2 D.编译失败
以下哪种初始化数组的方式是错误的?() A. String[]names={"zhang", "wang"...
以下哪种初始化数组的方式是错误的?()
A. String[]names={"zhang", "wang", "li"); B. String names[] =new String [3];names [0] ="zhang"; names [1] ="wang"; names [2] ="li"; C. String[3] names={"zhang", "wang", "li"}; D. 以上皆正确
现有: class Output { public static void main (String[]...
现有: class Output { public static void main (String[] args) { int i=5: System.out.print( "4"+i+""); System.out.print (i+5+"7"); System.out.println (i+"8"); } } 结果为:()
A. 99722 B. 955758 C. 4510758 D. 459722
现有: public class Tester { public static void main (St...
现有: public class Tester { public static void main (String[] args) { intx-5; Integer xl=x; Integer x2=x; int x3=new Integer(5); system..ut.print(x1.equals(x)); system..ut.print(xl==x); system..ut.print(x2.equals(xl)); system..ut.print(x2==xl); system..ut.print(x2==x3); system..ut.print(x2.equals(x3)); } } 结果为:()
A.编译失败 B.falsefalsetruetruetruetrue C.truetruetruetruetruetrue D.falsefalsetruetruetruefalse E.truefalsetruefalsefalsetrue F.运行时异常被抛出