多选题switch(x) { default: System.out.println(“Hello”); } Which two are acceptable types for x?()AbyteBlongCcharDfloatEShortFLong
多选题
switch(x) { default: System.out.println(“Hello”); } Which two are acceptable types for x?()
A
byte
B
long
C
char
D
float
E
Short
F
Long
参考解析
解析:
暂无解析
相关考题:
下面程序的输出结果是( )。 public class Sun { public static void main(String args[ ]) { int i = 9; switch (i) { default: System.out.println("default"); case 0: System.out.println("zero"); break; case 1: System.out.println("one"); case 2: System.out.println("two"); } } }A.defaunB.defauh, zeroC.error default clause not definedD.no output displayed
下面程序的输出结果是( )。 public class Sun { public static void main(String args[ ]) { int i = 1; switch (i) { case 0: System.out.println("zero"); break; case 1: System.out.println("one"); case 2; System.out.println("two"); default: System.out.println("default"); } } }A.oneB.one,defaultC.one,two,defaultD.default
给出下面程序段if(x>0){System.out.println“Hello.“;}elseif(x>-3){System.out.println“Nicetomeetyou“;}else{System.out.println“Howareyou“;}若打印字符串“Howareyou”,则x的取值范围是()。 A.x>0B.x>-3C.xD.x-3
publicclassBar{11.staticvoidfoo(int...x){12.//insertcodehere13.}14.}Which two code fragments,inserted independently at line1 2,will allow the class to compile() A.foreach(x)System.out.println(z);B.for(intz:x)System.out.println(z);C.while(x.hasNext())System.out.println(x.next());D.for(inti=0;i
switch(x){default:System.out.println(“Hello”);}Whichtwoareacceptabletypesforx?() A.byteB.longC.charD.floatE.ShortF.Long
下面程序的输出结果是( )。 public class Sun { public static void main(String args[ ]) { int i = 1; switch (i) { case 0: System.but.println("zero"); break; case 1: System.out.println("one"); case 2: System.out.println("two"); default: System.out.println ("default"); } } }A.oneB.one, defaultC.one, two, defaultD.default
编译和执行以下代码,输出结果是( )。 int i=1; switch (i) { case 0: System.out.print("zero,"); break; case 1: System.out.print("one,"); case 2: System.out.print("two,"); default: System.out.println("default"); }A.one,B.one,two,C.one,two,defaultD.default
给出下面程序段: if(x>0){System.out.println("Hello.");} else if(x>-3){ System.out.println("Nice to meet you!");} else{System.out.println("How are you?");} 若打印字符串"How are yoh?",则x的取值范围是( )。A.x>0B.x>-3C.x≤-3D.x≤0x>-3
以下程序段的输出结果为( )。 int j=2 switch (j){ Case 2: system.out.print("two."): Case 2+1: System.out.println("three."); break: default: System.out.println (“value is”+j): Break }A.B.twoA.two.three.B.twoC.threeD.value is 2
若有定义语句int a,b;double x;则下列选项中没有错误的是( )。A.switch(x%2) {case O:a++;break; case 1:b++;break; default:a++;b++; }B.switch((int)x/2.0) {case O:a++;break; case 1:b++;break; default:a++;b++; }C.switch((int)x%2) {case O:a++;break; case 1:b++;break; default:a++;b++; }D.switch((int)(x)%2) {case 0.O:a++;break; case 1.0:b++;break; default:a++;b++; }
有如下代码段:switch ( x ){case 1:System.out.println("One");break;case 2:case 3:System.out.println("Two");break;default:System.out.println("end");}变量x的取值下列哪些情形时,能使程序输出"Two" 。A. 1B. 2C. 3D. default
switch(x) { default: System.out.println(“Hello”); } Which two are acceptable types for x?() A、 byteB、 longC、 charD、 floatE、 ShortF、 Long
10. public class Bar { 11.static void foo(int...x) { 12. // insert code here 13. } 14. } Which two code fragments, inserted independently at line 12, will allow the class to compile?()A、 foreach(x) System.out.println(z);B、 for(int z : x) System.out.println(z);C、 while( x.hasNext()) System.out.println( x.next());D、 for( int i=0; i x.length; i++ ) System.out.println(x[i]);
switch (i) { default: 310-025 Leading the way in IT testing and certification tools,www.testking.com - 27 - System.out.printIn(“Hello”); } What are the two acceptable types for the variable i? ()A、 CharB、 ByteC、 FloatD、 DoubleE、 Object
switch (i) { default: System.out.printIn(“Hello”); ) What are the two acceptable types for the variable i?() A、 CharB、 ByteC、 FloatD、 DoubleE、 Object
Which fragment is an example of inappropriate use of assertions? ()A、 assert (!(map.contains(x))); map.add(x);B、 if (x 0){}else { assert (x==0); }C、 public void aMethod(int x) { assert (x 0); }D、 assert (invariantCondition()); return retval;E、 switch (x) { case 1: break; case 2: creak; default: assert (x == 0);
switch (i) { default: System.out.printIn(“Hello”); } What is the acceptable type for the variable i?() A、 ByteB、 LongC、 FloatD、 DoubleE、 ObjectF、 A and BG、 C and D
You have set the value of the NLS_TIMESTAMP_TZ_FORMAT parameter in the parameter file to YYYY/x7fMM/x7fDD. The default format of which two data types would be affected by this setting?()A、DATEB、TIMESTAMPC、INTERVAL YEAR TO MONTHD、INTERVAL DAY TO SECONDE、TIMESTAMP WITH LOCAL TIME ZONE
多选题You have set the value of the NLS_TIMESTAMP_TZ_FORMAT parameter in the parameter file to YYYY/x7fMM/x7fDD. The default format of which two data types would be affected by this setting?()ADATEBTIMESTAMPCINTERVAL YEAR TO MONTHDINTERVAL DAY TO SECONDETIMESTAMP WITH LOCAL TIME ZONE
单选题switch (i) { default: System.out.printIn(“Hello”); } What is the acceptable type for the variable i?()A ByteB LongC FloatD DoubleE ObjectF A and BG C and D
多选题10.publicclassBar{ 11.staticvoidfoo(int...x){ 12.//insertcodehere 13.} 14.} Which two code fragments,inserted independently at line1 2,will allow the class to compile()Aforeach(x)System.out.println(z);Bfor(intz:x)System.out.println(z);Cwhile(x.hasNext())System.out.println(x.next());Dfor(inti=0;i
多选题switch (i) { default: 310-025 Leading the way in IT testing and certification tools,www.testking.com - 27 - System.out.printIn(“Hello”); } What are the two acceptable types for the variable i? ()ACharBByteCFloatDDoubleEObject
多选题switch (i) { default: System.out.printIn(“Hello”); ) What are the two acceptable types for the variable i?()ACharBByteCFloatDDoubleEObject
多选题Area Border Router (ABR) is a router located on the border of one or more OSPF areas that connect those areas to the backbone network. An ABR will inject a default route into which two types of areas?()AArea 0BNSSACTotally stubbyDStub
多选题In which two cases does the compiler supply a default constructor for class A?()Aclass A{}Bclass A { public A(){} }Cclass A { public A(int x){} }Dclass Z {} class A extends Z { void A(){} }
多选题Which two EAP types does the Cisco Unified Wireless IP Phone 7921G firmware code version 1.3(x) support?()AEAP-TLSBEAP-TTLSCEAP-SIMDPEAPv1/EAP-GTCELEAP
多选题10. public class Bar { 11.static void foo(int...x) { 12. // insert code here 13. } 14. } Which two code fragments, inserted independently at line 12, will allow the class to compile?()Aforeach(x) System.out.println(z);Bfor(int z : x) System.out.println(z);Cwhile( x.hasNext()) System.out.println( x.next());Dfor( int i=0; i x.length; i++ ) System.out.println(x[i]);