1、如果有以下的程序代码: int x=100; int y=100; Integer wx=x; Integer wy=y; System.out.println(x==y); System.out.println(wx==wy); 在JDK5以上的环境中编译和执行,则显示结果是()。A.true trueB.true falseC.false trueD.编译失败

1、如果有以下的程序代码: int x=100; int y=100; Integer wx=x; Integer wy=y; System.out.println(x==y); System.out.println(wx==wy); 在JDK5以上的环境中编译和执行,则显示结果是()。

A.true true

B.true false

C.false true

D.编译失败


参考答案和解析
D

相关考题:

阅读以下应用说明及Visual Basic程序代码,将应填入(n)处的字句写在对应栏内。【说明8.1】以下程序的功能是:生成20个200~300之间的随机整数,输出其中能被5整除的数并求出它们的和。【程序代码8.1】Private Sub Command1_Click()For i=1 To 20x=Int((1)*200+100)If (2)=0 ThenPrint xS=S+ (3)End IfNext iPrint"Sum=";SEnd Sub【说明8.2】程序8.2运行后,单击窗体,则在窗体上显示的内容是:a=(4)和b=(5)。【程序代码8.2】Private Sub Form_Click()Dim a As Integer,b As Integera=20:b=50p1 a,bp2 a,bp3 a,bPrint"a=";a,"b=";bEnd SubSub p1(x As Integer, ByValy As Integer)x=x+l0y=y+20End SubSub p2(ByVal×As Integer, y As Integer)x=x+l0y=y+20End SubSub p3(ByVal×As Integer, ByVal y As Integer)x=x+10y=y+20End Sub

下面程序段的输出结果是( )。 public class Test { public static void main(String args[ ]){ int x,y; x=(int)Math.sqrt(5)/2+(int)Math.random()*5/2; y=(int)Math.sqrt(3)/2+(int)Math.random()*3/2; if (x>y) System.out.println("x>y"); else if (x==y) System.out.println("x=y"); else System.out.println("x<y"); } }A.x>yB.x=yC.x<yD.编译错误

执行下面程序段,屏幕上将输出( )。 public class Test { private int x=10,y=20; public Test (int x,int y) { System.out.println (x+this.x); System.out.println (y+y); } public static void main (String[] args) { Testt= new Test(30,50); } }A.无输出B.20 40C.40 100D.40 70

有如下函数过程: Function fun1(ByVal x As Integer,ByVal y As Integer) As Integer Do While y<>0 reminder=x Mod y x=y y=reminder Loop fun1=x End Function 在下列按钮单击事件中调用该函数,则该程序的运行结果是( )。 Private Sub Command1_Click() Dim a AS Integer Dim b As Integer a=100 b=25 x=fun1(a,B) Print x End SubA.0B.25C.50D.100

以下程序执行后的输出结果是( )。include usingnamespacestd;void try(int,int,int,in 以下程序执行后的输出结果是( )。 #include <iostream> using namespace std; void try(int,int,int,int); int main ( ) { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<end1; return 0; } void try(int x,int y, int z,int r) { z = x+y; x = X*X; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

下面程序段的输出结果是( )。 public class Test{ public static void main(String args[]){ int X,y; x=(int)Math.sqrt(5)/2+(int)Math.random*5/2; y=(int)Math.sqrt(3)/2+(int)Math.random*3/2; if(xv) System.OUt.println("xy"); elseif(x= =y) System.out.println("x=Y"); else System.out.println("xy"): } }A.xyB.x=YC.xyD.编译错误

下面程序段的输出结果是 public class Test{ public static void main(Stringargs[]){ int x,y; x=(int)Math.sqrt(5)/2+(int)Math.random()*5/2; y=(int)Math.sqrt(3)/2+(ht)Math.random()*3/2; if(x>y) System.out.println(”x>y”); else if(x=y) System.out.println(”x=y”); else System.out.Println(”x<y”); } }A.x>yB.x=yC.x<yD.编译错误

下列程序段执行后的输出结果为( )。 int x=3; int y=10; System.out.println(y%x);A.0B.1C.2D.3

设x和y均为int型变量,则执行下面的循环后,y值为( )。 public class Sun { public static void main(String args[ ]) { int x, y; for (y=1, x=1; y<=50; y++) { if(x>=10) break; if (x%2==1) { x+=5; continue; } x-=3; } System.out.println (y); } }A.2B.4C.6D.8

下面程序片段的执行中,说法正确的是( )。 public class Test { public static void main (String args[]) { byte y=20; int i=y; int x=100; y=x; System.out.println(y); } }A.输出y的值为100B.第4行错误C.输出y的值为20D.第6行错误

有如下函数过程: Function funl(ByVal x As Integer,ByVal y As Integer)As Integer Do While y<>0 reminder=x Mod y x=y y=reminder Loop fun1=x End Function 在下列按钮单击事件中调用该函数,则该程序的运行结果是( )。 Private Sub Command1_Click() Dim a As Integer Dim b As Integer a=100 b=25 x=funl(a,B)Print x End SubA.0B.25C.50D.100

标准模块中有如下程序代码: Public x As Integer,y As Integer Sub var pub( ) x=10:y=20 End Sub 在窗体上有1个命令按钮,并有如事件过程: Private Sub Command1 Click( ) Dim x As Integer Call var pub x=x+100 y=y+100 Print x;y End Sub 运行程序后单击命令按钮,窗体上显示的是( )。A.100 100B.100 120C.110 100D.110 120

设有如下程序: public class Sun { public static void main (String args[ ]) { int x,y; x= (int) Math.sqrt (2) /2+ (int) Math.random ()*2/2; y= (int) Math.sqrt (3) /3+ (int) Math.random ()*3/3; if (x>y) System.out.println ("x>y"); else if (x==y) System.out.println("x=y"); else System.out.println("x<y"); } } 程序运行的结果为( )。A.x>yB.x=yC.x<yD.以上都不对

下面程序段的输出结果是( )。 publicclassTest{ publicstaticvoidmain(Stringargs[]){ intx,y; x=(int)Math.sqrt(5)/2+(int)Math.random()*5/2; Y=(int)Math.sqrt(3)/2+(int)Math.random()*3/2; if(x>y) System.out.println9"x>y"); elseif(x==y) System.out.println("x=y"); else System.out.println("x<y"); } }A.x>yB.x=yC.x<yD.编译错误

下列程序的输出结果是______。 int x=3; int y=10; System.out.println(y%x);A.0B.1C.2D.1.0

下面程序段的输出结果是______。 public class Test{ public static void main(String args[ ]){ int x,y; x=(int)Math.sqrt(5/2)+(int)Math.random( )*5/2; y=(int)Math.sqrt(3/2)+(int)Math.random( )*3/2; if(x>y) System.out.println("x>y"); else if(x==y) System.out.println("x=y"); else System.out.println("x<y"); } }A.x>yB.x=yC.x<yD.编译错误

以下程序执行后的输出结果是include using namespace std;void try(int,int,int,int) 以下程序执行后的输出结果是 #include <iostream> using namespace std; void try(int,int,int,int); int main () { int x,y,z,r; x =1 ; y = 2; try(x,y,z,r); cout<<r<<endl; return 0; } void try(int x,int y,int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

以下程序执行后的输出结果是includeusing namcspace std;void try(int,int,int,int); 以下程序执行后的输出结果是 #include<iostream> using namcspace std; void try(int,int,int,int); int main() { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<end1; return 0; } void try(int x,int y, int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

有如下函数过程: Function Fun (By Val x As Ingeger, ByVal y As Integer)As Integer Do While…y<>0 reminder=x Mod y x=y y=reminder Loop Fun=x End Function 以下是调用该函数的事件过程,该程序的运行结果是 Private Sub Command1_Click() Dim a As Integer Dim b As Integer a=100:b=25 x=Fun(a,b)Print x End SubA.0B.25C.50D.100

以下程序执行后的输出结果是()。includeusing namespace std;void try(int,int,int,in 以下程序执行后的输出结果是( )。 #include<iostream> using namespace std; void try(int,int,int,int); int main() { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<endl; return 0; } void try(int x,int y, int z,int r) { z = x+y; X = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

以下程序执行后的输出结果是include.using namespace std;void try(int,int,int,int) 以下程序执行后的输出结果是 #include<iostream>. using namespace std; void try(int,int,int,int); int main() { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<end1; return 0; } void try(int x,int y, int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

有如下函数过程: Function fun1 (ByVal x As Integer, ByVal y As Integer) As Integer Do While y <> 0 reminder=x Mod y x=y y=reminder Loop fun1=x End Function 在下列按钮单击事件中调节器用该函数,则该程序的运行结果是( )。 Private Sub Command1_Click() Dim a As Integer Dim b As Integer a=100 b=25 x=fun1(a,b)Print x End SubA.0B.25C.5OD.100

对于关系模式R(X,Y,Z,W),下面有关函数依赖的结论中错误的是( )。A.若X→Y,WY→Z,则WX→ZB.若XY→Z,则X→ZC.若X→Y,Y→Z,则X→ZD.若X→YZ,则X→Z

class DemoApp{  public static void main(String[] args){  int x = 5; int y = ++x + x++; S ystem.out.println(“y=”+y+”,x=”+x);  }  }  以上程序运行后的输出结果是哪项?() A、y=10,x=5B、y=11,x=6C、y=12,x=7D、y=11,x=7

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

如果Y⊆X⊆U,则X→Y成立,这条推理规则称为();如果X→Y和WY→Z成立,则WX→Z成立,这条推理规则称为()。

若混凝土理论配合比为1:X:Y,且测得现场砂石子配合水率分别为WX、WY,则混凝土施工配合比为()。A、1:X(1-WY):Y(1-WY)B、1:XWX:YWYC、1:X(1+WX):Y(1+WY)D、1:X(1+WY):Y(1+WX)

单选题若混凝土理论配合比为1:X:Y,且测得现场砂石子含水率分别为wx、wy则混凝土施工配合比()。A1:X(1-WY):Y(1-WY)B1:XWx:YWyC1:X(1+Wx):Y(1+Wy)D1:X/(1+Wx):Y/(1+Wy)