异能第一季在线播放:那位大虾帮帮我做做这几道选择吧~~很急!!等这救命的!!(2)

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/28 22:36:08
37. Given: byte[] array1,array2[]; byte array3[][]; byte [][] array4;
假定所有数组都已经被初始化, 下面哪个语句会导致编译错误?
A.array2 = array1 B.array2=array3 C.array2=array4
38. 以下哪个表达式是不合法的(选两个)
A、String x="Hello"; int y=9; x+=y; B、String x="Hello"; int y=9; if(x==y) { }
C、String x="Hello"; int y=9; x=x-y;
D、String x=null; int y=(x!=null)&&(x.length()>0) ? x.length : 0
39. 编译运行以下程序后,关于输出结果的说明正确的是 ( )
public class Conditional{
public static void main(String args[ ]){
int x=4;
System.out.println("value is "+ ((x>4) ? 99 :9));}}
A、输出结果为:value is 99.99 B、输出结果为:value is 9 C、输出结果为:value is 9.0 D、编译错误
40. 以下声明合法的是( )
A、default String s; B、public final static native int w( )
C、abstract double d; D、abstract final double hyperbolicCosine( )
41. 关于以下application的说明,正确的是( )
1. class StaticStuff
2. { static int x=10;
4. static { x+=5;}
5. public static void main(String args[ ])
6. {System.out.println("x=" + x);}
9. static { x/=5;} }
A、 4行与9行不能通过编译,因为缺少方法名和返回类型
B、 9行不能通过编译,因为只能有一个静态初始化器
C、 编译通过,执行结果为:x=5 D、 编译通过,执行结果为:x=3
42. 关于以下程序代码的说明正确的是( )
1. class HasStatic{
2. private static int x=100;
3. public static void main(String args[ ]){
4. HasStatic hs1=new HasStatic( );
5. hs1.x++;
6. HasStatic hs2=new HasStatic( );
7. hs2.x++;
8. hs1=new HasStatic( );
9. hs1.x++;
10. System.out.println("x="+x);}}
A、 5行不能通过编译,因为引用了私有静态变量
B、 10行不能通过编译,因为x是私有静态变量
C、 程序通过编译,输出结果为:x=103 D、 程序通过编译,输出结果为:x=102
43. 以下选项中循环结构合法的是()
A、int i=5;
while (i<7)
{ i++; System.out.println("i is "+i); }
B、 int j=3;
while(j)
{ System.out.println(" j is "+j); }
C、 int j=0;
for(int k=0; j + k !=10; j++;k++)
{ System.out.println(" j is "+ j + "k is"+ k); }
D、 int j=0;
do{ System.out.println( "j is "+j++);
if (j = = 3) {continue loop;}
} while (j<10);
44.类Test1定义如下:
1.public class Test1{public float aMethod(float a,float b){ }}
将以下哪种方法插入行3是不合法的。( )
A、 public float aMethod(float a, float b,float c){ }
B、 public int aMethod(float c,float d){ }
C、 public int aMethod(int a, int b){ } D、 private float aMethod(int a,int b,int c){ }
45.类Test1、Test2定义如下:
1. public class Test1
2.{ public float aMethod(float a,float b) throws
3. Exception { }4. }
5. public class Test2 extends Test1{}
将以下哪种方法插入行6是合法的。(选两个)
A、 protected float aMethod(float a,float b){ }
B、 public int aMethod(int a,int b)throws Exception{ }
C、 public float aMethod(float p,float q){ }
D、 public int aMethod(int a,int b)throws IOException{ }

37. Given: byte[] array1,array2[]; byte array3[][]; byte [][] array4;
假定所有数组都已经被初始化, 下面哪个语句会导致编译错误? A
A.array2 = array1 B.array2=array3 C.array2=array4
38. 以下哪个表达式是不合法的(选两个) BC
A、String x="Hello"; int y=9; x+=y; B、String x="Hello"; int y=9; if(x==y) { }
C、String x="Hello"; int y=9; x=x-y;
D、String x=null; int y=(x!=null)&&(x.length()>0) ? x.length : 0
39. 编译运行以下程序后,关于输出结果的说明正确的是 ( B)
public class Conditional{
public static void main(String args[ ]){
int x=4;
System.out.println("value is "+ ((x>4) ? 99 :9));}}
A、输出结果为:value is 99.99 B、输出结果为:value is 9 C、输出结果为:value is 9.0 D、编译错误
40. 以下声明合法的是(B )
A、default String s; B、public final static native int w( )
C、abstract double d; D、abstract final double hyperbolicCosine( )
41. 关于以下application的说明,正确的是(D )
1. class StaticStuff
2. { static int x=10;
4. static { x+=5;}
5. public static void main(String args[ ])
6. {System.out.println("x=" + x);}
9. static { x/=5;} }
A、 4行与9行不能通过编译,因为缺少方法名和返回类型
B、 9行不能通过编译,因为只能有一个静态初始化器
C、 编译通过,执行结果为:x=5 D、 编译通过,执行结果为:x=3
42. 关于以下程序代码的说明正确的是(C )
1. class HasStatic{
2. private static int x=100;
3. public static void main(String args[ ]){
4. HasStatic hs1=new HasStatic( );
5. hs1.x++;
6. HasStatic hs2=new HasStatic( );
7. hs2.x++;
8. hs1=new HasStatic( );
9. hs1.x++;
10. System.out.println("x="+x);}}
A、 5行不能通过编译,因为引用了私有静态变量
B、 10行不能通过编译,因为x是私有静态变量
C、 程序通过编译,输出结果为:x=103 D、 程序通过编译,输出结果为:x=102
43. 以下选项中循环结构合法的是(A)
A、int i=5;
while (i<7)
{ i++; System.out.println("i is "+i); }
B、 int j=3;
while(j)
{ System.out.println(" j is "+j); }
C、 int j=0;
for(int k=0; j + k !=10; j++;k++)
{ System.out.println(" j is "+ j + "k is"+ k); }
D、 int j=0;
do{ System.out.println( "j is "+j++);
if (j = = 3) {continue loop;}
} while (j<10);

自己学呀!别人帮你做了,你闲着做啥呀?泡妞吗?

高难度的,做不起

还怪吓人来 我想学的