(单选题)2: 下列程序段输出的结果是_______。public class NewClass { public static void main(String args[]){ int x=0; boolean b1,b2,b3,b4; b1=b2=b3=b4=true; x=(b1|b2&b3^b4)?...
(单选题)17: 下面程序段的输出结果是public class Test{ public static void main(String args[]){ int x,y; x=4;y=0; if(Math.pow(x, 3)==64) y=x; if(Math.pow(x, 3)<60) y=1/x; if(Math.pow(x, 3...
(单选题)16: 当编译和运行下面的代码时,出现的结果为_______。public class NewClass { static int total=10; public static void main(String args[]){ new NewClass(); } public NewClass(){ System.out.println("In...
(单选题)14: 下面的程序段,方法A返回的类型为_______。public class ReturnA{ ReturnType A(byte x,double y){ return (short)x/y*2; } } A: double B: byte C: float D: short ...
(单选题)8: 在C#的类结构中,class关键字前面的关键字是表示访问级别,下面哪个关键字表示该类只能被这个类的成员或派生类成员访问?( ) A: public B: private C: internal D: protected ...
(单选题)14: 下列程序段的输出结果是 ( )。 public class operatorsandExpressions{ void stringPlus(){ int x=3,y=4,z=5; System.out.println(x+y+z); } } A: xyz B: x+y+z C: 12 D: 以上答案均不正确 ...
(单选题)5: 下列代码中,将引起一个编译错误的行是( ) 1)public class Test{ 2) int m,n; 3) public Test(){} 4) public Test(int a){m=a;} 5) public static void main(String args[]){ 6) Test t1,t2; 7) int j,k; 8) j=0;k=0; 9) t1=new Test(); 10) ...
(单选题)1: 关于以下程序段的说法正确的是( )。 1. public class Myar{ 2. public static void main(String argv[]){ 3. int[]i=new int[5]; 4. System.out.println(i[5]); 5. } 6. } A: 第2行编译出错 B: 第4行编译出错 C: 编译时产生错误 D: 编译...
(单选题)5: 无修饰符类:class Car{...},则类Car()。 A: 可被其他程序包中的类使用 B: 仅能被本程序包中的类使用 C: 不能被任何类使用 D: 不能被其他类继承 ...
(单选题)7: What_____do you like best after class? A: act B: action C: activity D: active ...