网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
class Test4 {   public static void main(String [] args) {   boolean x = true;   boolean y = false;   short z = 42;   if((z++ = = 42) && (y = true)) z++;   if((x = false) || (++z = = 45)) z++;   System.out.println("z = " + z);   }   }   结果为:()
A

z = 42

B

z = 44

C

z = 45

D

z = 46


参考答案

参考解析
解析: 暂无解析
更多 “单选题class Test4 {   public static void main(String [] args) {   boolean x = true;   boolean y = false;   short z = 42;   if((z++ = = 42)  (y = true)) z++;   if((x = false) || (++z = = 45)) z++;   System.out.println("z = " + z);   }   }   结果为:()A z = 42B z = 44C z = 45D z = 46” 相关考题
考题 以下程序的运行结果为( )。 public class Sun { public static void main(String args[]) { String x="A",y="B",z="C"; for(int m=1;m<=2;m++) { x=y; y=z; z=x; } System.out.println(x+y+z); } }A.ABCB.BCAC.BCBD.CBC

考题 执行完下列代码段之后: bool x=true, y=false, z=false; x=xy‖z; y=x‖yz; z=!(x!=y)‖(y-z); 则x=false, y=false, Z=( )。A.trueB.falseC.不确定D.异常

考题 写出执行完下列代码段之后指定变量的值:boo1 x=true,y=false,z=false;x=xy‖z;y=x‖yz;z=!(x!=y)‖(y==z),则 x=false, y=false, z=【 】。

考题 classTest2{publicstaticvoidmain(String[]args){booleanx=true;booleany=false;shortz=42;if((x==true)y=true))z++;if((y==true||++z=44))z++;System.out.println(z=”+z);}}结果是什么?() A.z=42B.z=43C.z=44D.z=45E.编译失败F.运行的时候有异常抛出

考题 classFoo{publicstaticvoidmain(String[]args){intx=0;inty=4;for(intz=0;z〈3;z++,x++){if(x〉1++y〈10)y++;}System.out.println(y);}}结果是什么?() A.6B.7C.8D.10

考题 classTest4{publicstaticvoidmain(String[]args){booleanx=true;booleany=false;shortz=42;if((z++==42)(y=true))z++;if((x=false)||(++z==45))z++;System.out.println(z=+z);}}结果为:() A.z=42B.z=44C.z=45D.z=46

考题 现有:classFoo{publicstaticvoidmain(String[]args){intx=O;inty=4;for(intz=0;z3;Z++;X++){if(x1++y10)y++;}System.out.println(y);}}结果是什么?() A.7B.8C.10D.12

考题 现有:classTest2fpublicstaticvoidmain(String[]args){booleanX=true;booleany=false;shortZ=20;if((x==true)if((y==true)||(++z==22))z++;System.out.println(z=+z);}结果是什么?() A.Z=21B.Z=22C.Z=23D.Z=24

考题 现有:classTest4{publicstaticvoidmain(String[]args){booleanX=true;booleany=false;shortZ=42;if((z++==42)if((x=false)||(++z==45))z++;System.out.println(z=”+z);}}结果为:() A.Z=42B.z=44C.Z=45D.z=46

考题 执行下列代码段之后,变量z的值为______。 Public class Test8 { public static void main(String[] args) { int x=2; int y=3; int z=4; z-....= y-x--; System.out.println(z); }A.1B.2C.3D.4

考题 写出执行完下列代码段之后指定变量的值:bool x=true ,y=false,z=false;x=xy||z;y=x||yz;z=!(x!=y)||(y==z);则x=false,y=【 】,z=【 】。

考题 以下程序的输出结果为:public class test {public static void main(String args[]) {int x=1,y=1,z=1;if (x--==1}} A. x=0,y=2,z=1B. x=1,y=2,z=1C. x=0,y=1,z=1D. x=0,y=2,z=2

考题 现有:  class Test2  f  public static void main (String  []  args)  {      boolean X= true;      boolean y=false;      short Z=20;      if((x==true)  &  (y=true))  z++;     if((y==true) ||  (++z==22))  z++;      System. out .println( "z="+z);      }      结果是什么?()     A、Z=21B、Z=22C、Z=23D、Z= 24

考题 现有:  class  Test4  {  public static void main (String  []  args)  {    boolean X=true;   boolean y=false;    short Z=42;    if((z++==42)  &&  (y=true))z++;    if((x=false)  ||    (++z==45))  z++;    System. out.println(¨z=”+z);     }    }  结果为:() A、  Z=42B、  z=44C、  Z= 45D、  z= 46

考题 class Foo {  public static void main(String [] args) {  int x = 0;  int y = 4;  for(int z=0; z 〈 3; z++, x++) {  if(x 〉 1  ++y 〈 10) y++;  }  System.out.println(y);  }  }  结果是什么?()  A、6B、7C、8D、10

考题 现有:  class Foo  {  public static void main (String  []  args)  {      int x=O;      int y=4;  for (int  z=0;  z3;  Z++;  X++)  {     if(x1++y10)    y++;    }  System. out .println (y);  }   }  结果是什么?()     A、7B、8C、10D、12

考题 public class Yikes {  public static void go(Long n) {System.out.println(”Long “);}  public static void go(Short n) {System.out.println(”Short “);}  public static void go(int n) {System.out.println(”int “);}  public static void main(String [] args) {  short y= 6;  long z= 7;  go(y);  go(z);  }  }  What is the result?() A、 int LongB、 Short LongC、 Compilation fails.D、 An exception is thrown at runtime.

考题 class Test2{   public static void main(String [] args){   boolean x=true;   boolean y=false;   short z=42;   if((x==true)y=true))z++;   if((y==true||++z=44))z++;   System.out.println(“z=”+z);  }  }   结果是什么?()  A、 z=42B、 z=43C、z=44D、 z=45E、编译失败F、运行的时候有异常抛出

考题 public class Wow {  public static void go(short n) {System.out.println(”short”); }  public static void go(Short n) {System.out.println(”SHORT”);}  public static void go(Long n) {System.out.println(” LONG”); }  public static void main(String [] args) {  Short y= 6;  int z=7;  go(y);  go(z);  }  }  What is the result?() A、 short LONGB、 SHORT LONGC、 Compilation fails.D、 An exception is thrown at runtime.

考题 class Test4 {   public static void main(String [] args) {   boolean x = true;   boolean y = false;   short z = 42;   if((z++ = = 42)  (y = true)) z++;   if((x = false) || (++z = = 45)) z++;   System.out.println("z = " + z);   }   }   结果为:()  A、z = 42B、z = 44C、z = 45D、z = 46

考题 单选题现有:  class  Test4  {  public static void main (String  []  args)  {    boolean X=true;   boolean y=false;    short Z=42;    if((z++==42)  &&  (y=true))z++;    if((x=false)  ||    (++z==45))  z++;    System. out.println(¨z=”+z);     }    }  结果为:()A   Z=42B   z=44C   Z= 45D   z= 46

考题 单选题public class Yikes {  public static void go(Long n) {System.out.println(”Long “);}  public static void go(Short n) {System.out.println(”Short “);}  public static void go(int n) {System.out.println(”int “);}  public static void main(String [] args) {  short y= 6;  long z= 7;  go(y);  go(z);  }  }  What is the result?()A  int LongB  Short LongC  Compilation fails.D  An exception is thrown at runtime.

考题 单选题现有:  class Test2  f  public static void main (String  []  args)  {      boolean X= true;      boolean y=false;      short Z=20;      if((x==true)  &  (y=true))  z++;     if((y==true) ||  (++z==22))  z++;      System. out .println( "z="+z);      }      结果是什么?()A Z=21B Z=22C Z=23D Z= 24

考题 单选题执行完下列代码段之后:bool x=true, y=false, z=false; x=xy||z; y=x||yz; z=!(x!=y)||(y-z); 则x=false,y=false,z=(  )。A trueB falseC 不确定D 异常

考题 单选题class Test2{   public static void main(String [] args){   boolean x=true;   boolean y=false;   short z=42;   if((x==true)y=true))z++;   if((y==true||++z=44))z++;   System.out.println(“z=”+z);  }  }   结果是什么?()A  z=42B  z=43C z=44D  z=45E 编译失败F 运行的时候有异常抛出

考题 单选题class Test4 {   public static void main(String [] args) {   boolean x = true;   boolean y = false;   short z = 42;   if((z++ = = 42)  (y = true)) z++;   if((x = false) || (++z = = 45)) z++;   System.out.println("z = " + z);   }   }   结果为:()A z = 42B z = 44C z = 45D z = 46

考题 单选题class Foo {  public static void main(String [] args) {  int x = 0;  int y = 4;  for(int z=0; z 〈 3; z++, x++) {  if(x 〉 1  ++y 〈 10) y++;  }  System.out.println(y);  }  }  结果是什么?()A 6B 7C 8D 10

考题 单选题public class Wow {  public static void go(short n) {System.out.println(”short”); }  public static void go(Short n) {System.out.println(”SHORT”);}  public static void go(Long n) {System.out.println(” LONG”); }  public static void main(String [] args) {  Short y= 6;  int z=7;  go(y);  go(z);  }  }  What is the result?()A  short LONGB  SHORT LONGC  Compilation fails.D  An exception is thrown at runtime.