题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-27 00:10:38

[多项选择] 11.public class Commander{ 12.public static void main(String[]args){ 13.String myProp=/*insert code here*/ 14.System.out.println(myProp); 15.} 16.} and the command line: java-Dprop.custom=gobstopper Commander Which two,placed on line13,will produce the output gobstopper?()
A. System.load("prop.custom");
B. System.getenv("prop.custom");
C. System.property("prop.custom");
D. System.getProperty("prop.custom");
E. System.getProperties().getProperty("prop.custom");

更多"11.public class Commander{ 12.publi"的相关试题:

[单项选择]阅读下面程序 public class Test1 { public static void main(String[] args) {  System.out.println(34+56-6);  System.out.println(26*2-3);  System.out.println(3*4/2);  System.out.println(5/2);  } } 程序运行的结果是
A. 84 49 6 2
B. 90 25 6 2.5
C. 84 23 12 2
D. 68 49 14 2.5
[单项选择] 下列代码的输出是()。 public class test{public static void main(String args[]) {System.out.print("IBM/n012/63ABC//".length( ));}}
A. 12
B. 13
C. 14
D. 15
[单项选择]阅读下列代码: public class Test{ public static void main(String args[]{ System.out.println(100%3); System.out.pnntln(100%3.0); } } 程序运行结果为( )。
A. 1和1
B. 1和1.0
C. 1.0各1
D. 1.0和1.0
[单项选择] public class Pass{ public static void main(String[]args){ int x=5; Pass p=new Pass(); p.doStuff(x); System.out.print("mainx="+x); } void doStuff(intx){ System.out.print("doStuffx="+x++); } } What is the result?()
A. Compilation fails.
B. An exception is thrown at runtime.
C. doStuff x=6 main x=6
D. doStuff x=5 main x=5
E. doStuff x=5 main x=6
F. doStuff x=6 main x=5
[单项选择] public class Test{ public static void main(String[]args){ intx=5; boolean b1=true; boolean b2=false; if((x==4)&&!b2) System.out.print("l"); System.out.print("2"); if((b2=true)&&b1) System.out.print("3"); } } What is the result?()
A. 2
B. 3
C. 12
D. 23
E. 123
F. Compilation fails.
G. An exceptional ist hrown at runtime.
[单项选择] 程序: class TestApp{ public static void main (String[] args){ int x=6; if (x>l) System. out. println("x>l"); else if (x>5) System. out .println("x>5"); else if (x<10) System. out. println("xA. x>5
B. x>l
C. x<10
D. x<29
[单项选择] 现有: class TestApp{ public static void main (String[] args){ for (int i=0; iA. 0123
B. 012456789
C. 0123456789
D. 012
[单项选择]现有:class Test2 fpublic static void main (String [] args) {short a,b,C;a=1;b=2;C=a+b;a+=2;}}以上代码中,哪一句是错误的?()
A. a=1;
B. C=a+b;
C. a+=2;
D. shorta,b,C;
[单项选择]阅读下面程序 public class Test2 {  public static void main(String[] args) {   int a=10,b=4.c=20,d=6;    System.out.println(a++*b+c*--d);  } } 程序运行的结果是
A. 144
B. 160
C. 140
D. 164
[单项选择]阅读下面程序 public class Test4 {  public static void main(String[] args) {   int 1=10,j=3;   float m=213.5f,n=4.0f;   System.out.println(i%j);   System.out.println(m%n);  } } 程序运行的结果是
A. 1.0和1.5
B. 1和1.5
C. 1.0和2.5
D. 1和2.5
[单项选择]阅读下面程序 public class Test3 {  public static void main(String[] args) {   int x=3,y=4,z=5;   String s="xyz":   System.out.println(s+x+y+z);  } } 程序运行的结果是
A. xyz12
B. xyz345
C. xyzxyz
D. 12xyz
[单项选择] 11.public class Counter{ 12.public static void main(String[]args){ 13.int numArgs=/*insert code here*/; 14.} 15.} and the command line:java Counter one fred 42 Which code,inserted at line 13,captures the number of arguments passed into the program?()
A. args.count
B. args.length
C. args.count()
D. args.length()
E. args.getLength()
[单项选择]下列语句输出结果为( )。public class test{public static void main(String args []){String s1=new String("How");String s2=new String("How");System.out. println(!(s1 ==s2));}
A. false
B. true
C. 1
D. 0
[单项选择] 现有: 1. class Wrench f 2.public static void main(String [] args) { 3.Wrench w=new Wrench( ); Wrench w2=new Wrench( ); 4. w2=go (w, w2); 5.System.out.print (w2==w); 6. } 7.static Wrench go (Wrench wrl, Wrench wr2) { 8.Wrench wr3=wrl; wrl=wr2; wr2=wr3; 9. return wr3; 10. } 11. } 结果是什么?()
A. false
B. true
C. 编译失败
D. 运行的时候有异常抛出
[单项选择] public classYippee{ public static void main(String[]args){ for(intx=1;xSystem.out.print(args[x]+""); } } } and two separate command line invocations:j avaYippee javaYippee1234 What is the result?()
A. No output is produced.       123
B. No output is produced.        234
C. No output is produced.       1234
D. An exception is thrown at runtime.        123
E. An exception is thrown at runtime.         234
F. An exception is thrown at runtime.        1234
[单项选择] class Bird {  static void talk() { System.out.print("chirp "); }  }  class Parrot extends Bird {  static void talk() { System.out.print("hello "); }  public static void main(String [] args) {  Bird [] birds = {new Bird(), new Parrot()};  for( Bird b : birds)  b.talk();  }  }  结果为:() 
A. chirp chirp
B. chirp hello
C. hello hello
D. 编译失败
[单项选择] public static void main(String[]args){ String str="null"; if(str==null){ System.out.println("null"); }else(str.length()==0){ System.out.println("zero"); }else{ System.out.println("some"); } } What is the result?()
A. null
B. zero
C. some
D. Compilationfails.
E. Anexceptionisthrownatruntime.

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码