A.氧化型杀菌剂
B.非氧化型杀菌剂
C.表面活性剂杀菌剂
D.非表面活性剂杀菌剂
第1题
A. 3
B. 4
C.5
D.编译错误
E.6
第2题
以下程序的输出结果为:
public class test {
public static void main(String args[]) {
int s=0;
for (int k=0;k<=10;k++)
s+=method(2,k)-1;
System.out.println(s);
}
public static int method(int n,int m) {
if (m==0)
return 1;
else
return n*method(n,m-1、;
}
}
A. 2048
B. 1024
C. 2036
D.2000
第3题
分析并给出下列程序的运行输出结果: class Shape { private static int i; protected static int j=10; Shape () { System.out.println ("i = " + i + ", j = " + j); j = 5; } private static int x1 = printInit("private Shape.x1 initialized"); static int printInit(String s) { System.out.println (s); return ++i; } } public class Circle extends Shape { int k = printInit("Circle.k initialized"); public Circle () { System.out.println ("k = " + k); System.out.println ("j = " + j); System.out.println ("x2 = " + x2); super.printInit("super"); } public static int x2 = printInit("public Circle.x2 initialized"); public static void main(String[] args) { System.out.println ("Circle constructor"); Circle b = new Circle (); System.out.println ("b.k="+b.k); } }
第4题
【分录题】(4-3)写出以下程序运行结果。 public class Demo05 { public static void main(String[] args) { int temp = 0; int[][] arr = { { 3, 4, 5 }, { 7, 8, 2 }, { 1 }, { 6, 2, 8 } }; for (int[] list : arr) for (int x : list) { if(x>3) temp += list.length; } System.out.println(temp); } }
第5题
3下列程序段运行的结果为()。 public class Test{ static void print(String s,int i){ System.out.pdntlnC String: "+s+",int:"+i); } static void print(iht i,String s){ System.out.prinflnCint:"+i+",gtring:"+s); } public static void main(String[] args){ print(99,"Int first"); } }
A.String:String first,int: 11
B.int: 11,String:Int first
C.String:String first,int:99
D. int:99,Stfing:Int first
第6题
以下程序的运行结果为?
class xyz {
public static void main(String args[]) {
int i,j,k;
for (i = 0; i< 3; i++) {
for(j=1; j< 4; j++) {
for(k=2; k<5; k++) {
if((i == j) && (j==k))
System.out.println(i);
}
}
}
}
}
A. 0
B. 1
C. 2
D. 3
E. 4
第7题
【填空题】预测程序运行结果 class Student{ private int age; public void setAge(int a){ age=a;} public int getAge(){ return age; } } public class StudentDemo{ public static void main(String []args){ Student s=new Student(); s.setAge(20); System.out.println(s.getAge());}}
第8题
执行下列程序段之后,输出的结果为______。
public class exl0
{
public static void main(String[] args)
{
int i=3;
int j=7;
int k=8;
boolean b=j>i∧k!=i;
System.out.println(b);
}
}
第9题
写出以下程序的运行结果? public class Test{ public static void main(String argv[]){ String s = new String("hello"); myMethod(s); System.out.println("s=" + x); } public static void myMethod(String s){ s = s + "!"; } }
A、s=hello!
B、s=hello
C、hello!
D、hello
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!