多选题Given:  Integer i = new Integer (42);  Long l = new Long (42);  Double d = new Double (42.0);   Which two expression evaluate to true?()A(i = = l)B(i = = d)C(d = = l)D(i.equals(d))E(i.equals(i))F(i.equals(42))

多选题
Given:  Integer i = new Integer (42);  Long l = new Long (42);  Double d = new Double (42.0);   Which two expression evaluate to true?()
A

(i = = l)

B

(i = = d)

C

(d = = l)

D

(i.equals(d))

E

(i.equals(i))

F

(i.equals(42))


参考解析

解析: 暂无解析

相关考题:

( 18 )字面常量 42 、 4.2 、 42L 的数据类型分别是A ) long 、 double intB ) long 、 float 、 intC ) int 、 double 、 longD ) int 、 float 、 long

下面各选项中正确的是( )。 Ⅰ:long l=4990 Ⅱ:int i=4L Ⅲ:float f=1.1 Ⅳ:double d=34A.Ⅱ、ⅢB.Ⅱ、Ⅲ、ⅣC.Ⅰ、ⅣD.Ⅲ、Ⅳ

设有如下程序: Private Sub Form. Click( ) Dim s As Long,f As Long Dim n As Integer,i As Integer f=1 n=4 For i=1 To n f=f*i s=s+f Next i Print s End Sub 程序运行后,单击窗体,输出结果是( )。A.32B.33C.34D.35

Given:Integeri=newInteger(42);Longl=newLong(42);Doubled=newDouble(42.0);Whichtwoexpressionevaluatetotrue?() A.(i==l)B.(i==d)C.(d==l)D.(i.equals(d))E.(i.equals(i))F.(i.equals(42))

public static void main(String[]args){Integer i=new Integer(1)+new Integer(2);switch(i){case3:System.out.println(three);break;default:System.out.println(other);break;}}Whatistheresult?()A.threeB.otherC.Anexceptionisthrownatruntime.D.Compilationfailsbecauseofanerroronline12.E.Compilationfailsbecauseofanerroronline13.F.Compilationfailsbecauseofanerroronline15.

Integeri=newInteger(42);Long1=newLong(42);Doubled=newDouble(42.0);WhichtwoexpressionsevaluatetoTrue?() A.(i==1)B.(i==d)C.(d==1)D.(i.equals(d))E.(d.equals(i))F.(i.equals(42)

阅读下面求质数的程序 import java. lang. Math. * ; public class MorePrimesTest{ public static void main(String[]args){ long[]primes=new long[20]; primes[0]2L; primes[1]3L; long number=5L; outer: for(int count=2; count<primes. length; number+ =2L){ long limit=(long)Math. ceil(Math. sqrt((double)number)); for(int i=1; i<count primes[i]<limit; i+ +){ if(number______primes[i]==0L){ cotinue outer; } } for(int j=0; j<primes. length; j ++){ long n=primes[j]; System. out. println(n); } } } 在程序下画线处填入的正确选项是A.B.*C./D.%

字面常量42、4.2、42L的数据类型分别是( )。 A.long,double、intB.lon9、float、int 字面常量42、4.2、42L的数据类型分别是( )。A.long,double、intB.lon9、float、intC.int、double、longD.int、float、long

用整数10创建一个Integer类的对象,下列各语句中能完成此功能的是( )。A.Integer i=new Integer(10);B.Integer i=10;C.int i=10;D.Integer i=Integer(10);

阅读下面求质数的程序 import java.lang.Math.*: public class MorePrimesTest { public static void main(String[] args) { long[] primes=new long[20]; primes[0]=2L; primes[0]=3L; long number=5L; outer: for(int count=2;count<primes.length;number+=2L) { long limit=(long)Math.ceil(Math.sqrt((double)number)); for(int i=1;i<countprimes[i]<=limit;i++) { if(number primes[i]==OL)continue outer; } primes[count++]=number; } for(int J=0;j<primes.length;j++) { long n=primes[j]; System.out.println(n); } } } 程序下画线处应填入的正确选项是A.B.*C./D.%

字面常量42、4.2、42L的数据类型分别是( )。A.long,double,intB.long,float,intC.int,double,longD.int,float,long

编写JSP小脚本,实现访问该JSP时,在会话对象中保存int型变量i的有效语句是()。A、session.setAttribute(i,”I”)B、session.setParameter(“I”,i)C、session.setAttribute(new Integer(i),”I”)D、session.setAttribute(“I”,new Integer(i))

public class Test {  public static void add3 (Integer i) {  int val = i.intValue();  val += 3;  i = new Integer(val); }  public static void main(String args[]) {  Integer i = new Integer(0);  add3(i);  System.out.println(i.intValue());  }  }   What is the result? () A、 0B、 3C、 Compilation fails.D、 An exception is thrown at runtime.

Given:  Integer i = new Integer (42);  Long l = new Long (42);  Double d = new Double (42.0);   Which two expression evaluate to true?()A、 (i = = l)B、 (i = = d)C、 (d = = l)D、 (i.equals(d))E、 (i.equals(i))F、 (i.equals(42))

根据下面代码定义,下列表达式结果为真的有()。A、(i==1)B、(i==D.C、(d==1)D、(i.equalsD.)E、(D.equals(i))F、(i.equals(42))

public static void main( String[] args ) {  Integer a = new Integer(10);  Integer b = new Integer(10);  Integer c = a;  int d = 10;  double e = 10.0;  }   Which three evaluate to true?()   A、 (a == c)B、 (d == e)C、 (b == d)D、 (a == b)E、 (b == c)F、 (d == 10.0)

Integer i = new Integer (42);  Long 1 = new Long (42);  Double d = new Double (42.0);   Which two expressions evaluate to True?()A、 (i ==1)B、 (i == d)C、 (d == 1)D、 (i.equals (d))E、 (d.equals (i))F、 (i.equals (42)

public static void main(String[]args){ Integer i=new Integer(1)+new Integer(2); switch(i){ case3:System.out.println("three");break; default:System.out.println("other");break; } } Whatistheresult?()A、threeB、otherC、Anexceptionisthrownatruntime.D、Compilationfailsbecauseofanerroronline12.E、Compilationfailsbecauseofanerroronline13.F、Compilationfailsbecauseofanerroronline15.

public class test {   public static void add3 (Integer i){  int val = i.intValue ( );   val += 3;   i = new Integer (val);    }     public static void main (String args [ ] )  { Integer i = new Integer (0);    add3 (i);   system.out.printIn (i.intValue ( ) );   }    }   What is the result?()A、 Compilation will fail.B、 The program prints “0”.C、 The program prints “3”.D、 Compilation will succeed but an exception will be thrown at line 3.

10. public class MyClass {  11.  12. public Integer startingI;  13. public void methodA() {  14. Integer i = new Integer(25);  15. startingI = i;  16. methodB(i);  17. }  18. private void methodB(Integer i2) {  19. i2 = i2.intValue();  20.  21. }  22. }  If methodA is invoked, which two are true at line 20?()A、 i2 == startingI returns true.B、 i2 == startingI returns false.C、 i2.equals(startingI) returns true.D、 i2.equals(startingI) returns false.

Which of the following statements are legal?()         A、 long l = 4990;B、 int i = 4L;C、 float f = 1.1;D、 double d = 34.4;E、 double t = 0.9F;

多选题public static void main( String[] args ) {  Integer a = new Integer(10);  Integer b = new Integer(10);  Integer c = a;  int d = 10;  double e = 10.0;  }   Which three evaluate to true?()A(a == c)B(d == e)C(b == d)D(a == b)E(b == c)F(d == 10.0)

单选题编写JSP小脚本,实现访问该JSP时,在会话对象中保存int型变量i的有效语句是()。Asession.setAttribute(i,”I”)Bsession.setParameter(“I”,i)Csession.setAttribute(new Integer(i),”I”)Dsession.setAttribute(“I”,new Integer(i))

多选题根据下面代码定义,下列表达式结果为真的有()。A(i==1)B(i==D.C(d==1)D(i.equalsD.)E(D.equals(i))F(i.equals(42))

单选题public class test {  public static void add3 (Integer i)  int val = i.intValue ( );  val += 3;  i = new Integer (val);  } public static void main (String args [ ] )  {  Integer  i = new Integer (0);  add3 (i);  system.out.printIn (i.intValue ( )  );  } What is the result?()A Compilation will fail.B The program prints “0”.C The program prints “3”.D Compilation will succeed but an exception will be thrown at line 3.

多选题10. public class MyClass {  11.  12. public Integer startingI;  13. public void methodA() {  14. Integer i = new Integer(25);  15. startingI = i;  16. methodB(i);  17. }  18. private void methodB(Integer i2) {  19. i2 = i2.intValue();  20.  21. }  22. }  If methodA is invoked, which two are true at line 20?()Ai2 == startingI returns true.Bi2 == startingI returns false.Ci2.equals(startingI) returns true.Di2.equals(startingI) returns false.

多选题Integer i = new Integer (42);   Long 1 = new Long (42);  Double d = new Double (42.0); Which two expressions evaluate to True? ()A(i ==1)B(i == d)C(d == 1)D(i.equals (d))E(d.equals (i))F(i.equals (42))