【简答题】下面程序运行结果为 为: ______ public class Lianxi { public static void main(String args[ ]) { for (int i=1;i<=4; i++){ switch(i) { case 2: System.out.println("B"); case 3: System.out.println("C"); break; case 1...
【多选题】下列程序中哪些【代码】是错误的? public class LianXi{ public static void main (String args[]) { int x=0; //【代码1】 x=5.0/2; //【代码2】 float y=1.89F; //【代码3】 y=12.6/8; //【代码4】 System.out.print...
【简答题】下面代码有错误的地方,写出标号 public class LianXi2 { public static void main (String args【】){ int x=0; //1 x=5.0/2; //2 float y=1.89F; //3 y=12.6/8; //4 System.out .println(y); } }
【简答题】下面程序运行结果为: (______) ;将 int i=1 替换为 int i=2 ,程序运行结果为: (______) ;将 int i=1 替换为 int i=3 ,程序运行结果为: (______) ;将 int i=1 替换为 int i=4 ,程序运行结果为: (______) 。 public class Lianxi3 { public static void main(Strin...
【简答题】下列程序的输出结果是什么? public class LianXi { public static void main(String[] args) { int x=1,y=6; while(y-->0){ x--; } System.out.println("x="+x+",y="+y); } }