40.下面哪种注释方法能够支持 javadoc命令: BCD 、多选题(40道) 1.下面代码输出的结果是? public class My For public static void main(String argO int i int outer for(i=1; i <3: i++) inner for(=1: j<3: j++)( if(==2) continue outer System. out. printIn( " Value for =+i+"Value for j="+D) a Value for i=1 value for j=1 B Value for i=2 value for j= c Value for i =2 value for j=2 D Value for i =3 value for j=1 2.那些方法可以插入到程序中注释片段位置? class Base( public void amethod (int i)(] public class Scope extends Base( public static void main(string argvl)t Method Here(选择项插入位置)
40. 下面哪种注释方法能够支持 javadoc 命令: A /**...**/ B /*...*/ C // D /**...*/ 二、 多选题(40 道) 1. 下面代码输出的结果是? public class MyFor{ public static void main(String argv[]){ int i; int j; outer:for (i=1;i <3;i++) inner: for(j=1; j<3; j++) { if (j==2) continue outer; System.out.println("Value for i=" + i + " Value for j=" +j); } } } A Value for i=1 value for j=1 B Value for i=2 value for j=1 C Value for i=2 value for j=2 D Value for i=3 value for j=1 2. 那些方法可以插入到程序中注释片段位置? class Base{ public void amethod(int i) { } } public class Scope extends Base{ public static void main(String argv[]){} //Method Here(选择项插入位置) }
a void amethod(int i) throws Exception t B void amethod(long throws Exception t C void amethod(long i)t d public void amethod(int i) throws Exception t 3.在下面代码中那些修饰符可以放在XX位置 public class My Class1 public static void main(String argy 修饰符位置 XX/class MyInner A public B private 4.根据程序代码选择所有返回为true的表达式 aras Float f=new Float(4 Float C. Double d=new Double(4.2) float fl=4,2f: c=f a fequls(d) B cc==d 5.哪两种方法不能直接引起一个线程中断执行 a sleep B stop: c yield D waito E notify G synchronized 6.重载类ha的构造方法,下面哪些是正确的 B hai(int a, int b) c public hai (int a) D int hai (int C, int d) E int hai(string s)
A void amethod(int i) throws Exception {} B void amethod(long i)throws Exception {} C void amethod(long i){} D public void amethod(int i) throws Exception {} 3. 在下面代码中那些修饰符可以放在XX位置 public class MyClass1 { public static void main(String argv[]){ } /*修饰符位置 XX */ class MyInner {} } A public B private C static D friend 4. 根据程序代码选择所有返回为true的表达式 public static void main(String args[]){ Float f=new Float(4.2f); Float c; Double d=new Double(4.2); float fl=4.2f; c=f; } A f.equls(d) B c==f C c==d D c.equls(f) 5. 哪两种方法不能直接引起一个线程中断执行 A sleep(); B stop(); C yield(); D wait(); E notify(); F notifyAll() G synchronized() 6. 重载类hai的构造方法,下面哪些是正确的 A public void hai(int a) B hai(int a,int b) C public hai(int a) D int hai(int c, int d) E int hai() F int hai(String s)
7.覆盖(重写)方法 void hai(inta,intb),下面那些是正确的 a public void hai(int a, int b) B protected void hai(int a, int b) c public hai(int a) D int hai(int C, int d) E F int hai( string s) 8.如果在try代码块中没有异常发生,则会输出那些结果 public static void main(String args[X System. out. printin( 1); ∥A catc (Runtime Exception x) catch(Exception ut printIn( 3); System. out. printin( 4); System.out. printin(5); B 2 E 5 9.下面表达式中结果相同的是 C3*4 D3<<2 10.下面表达式哪两个的值相等 A16<<2 C16>>2 E16>>>2F16/2 11.下面那些线程状态事务是正确的?
7. 覆盖(重写)方法void hai(int a,int b),下面那些是正确的 A public void hai(int a,int b) B protected void hai(int a,int b) C public hai(int a) D int hai(int c, int d) E int Hai() F int hai(String s) 8. 如果在try代码块中没有异常发生,则会输出那些结果 public static void main(String args[]){ try{ System.out.println("1"); /////AA }catch (RuntimeException x){ System.out.println("2"); return; }catch(Exception x){ System.out.println("3"); return; }finally{ System.out.println("4"); } System.out.println("5"); } A 1 B 2 C 3 D 4 E 5 9. 下面表达式中结果相同的是 A 3/2 B 3<2 C 3*4 D 3<<2 10. 下面表达式哪两个的值相等 A 16<<2 B 16/3*2 C 16>>2 D 16<<<2 E 16>>>2 F 16/2 11. 下面那些线程状态事务是正确的?