上海神机软件有限公司

上海神机软件有限公司

ID:38705811

大小:324.00 KB

页数:13页

时间:2019-06-17

上海神机软件有限公司_第1页
上海神机软件有限公司_第2页
上海神机软件有限公司_第3页
上海神机软件有限公司_第4页
上海神机软件有限公司_第5页
资源描述:

《上海神机软件有限公司》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、选择题1:Whichofthefollowingansweriscorrecttoexpressthevalue8inoctalnumber?A.010B.0x10C.08D.0x82:Whichstatementaboutlisteneristrue?A.Mostcomponentallowmultiplelistenerstobeadded.B.Ifmultiplelistenerbeaddtoasinglecomponent,theeventonlyaffectedonelistener.C.Co

2、mponentdon?tallowmultiplelistenerstobeadd.D.none3:Give the following java class:  public class Example{  static int x[]=new int[15];  public static void main(String args[]){  System.out.println(x[5]);  }  }  Which statement is corrected?  Givethefollowin

3、gjavaclass:publicclassExample{staticintx[]=newint[15];publicstaticvoidmain(Stringargs[]){System.out.println(x[5]);}}Whichstatementiscorrected?A.Whencompile,someerrorwilloccur.B.Whenrun,someerrorwilloccur.C.Outputiszero.D.Outputisnull.4:Give the following

4、 java source fragement:  //point x  public class Interesting{  //do something  }  Which statement is correctly Java syntax at point x?   Givethefollowingjavasourcefragement://pointxpublicclassInteresting{//dosomething}WhichstatementiscorrectlyJavasyntaxa

5、tpointx?A.publicclassMyClass{//dootherthing…}B.staticintPI=3.14C.classMyClass{//dosomething…}D.none5:What will be the result of executing the following code?    boolean a = true;   boolean b = false;   boolean c = true;   if (a == true)   if (b == true) 

6、  if (c == true)    System.out.println("Some things are true in this world");   else       System.out.println("Nothing is true in this world!");    else if (a && (b = c))  System.out.println("It's too confusing to tell what is true and what is false");  

7、  else   System.out.println("Hey this won't compile");     Choices:  Whatwillbetheresultofexecutingthefollowingcode?booleana=true;booleanb=false;booleanc=true;if(a==true)if(b==true)if(c==true)System.out.println("Somethingsaretrueinthisworld");elseSystem.

8、out.println("Nothingistrueinthisworld!");elseif(a&&(b=c))System.out.println("It'stooconfusingtotellwhatistrueandwhatisfalse");elseSystem.out.println("Heythiswon'tcompile");Choices:A.Thecodewon'tcompileB."Somethingsaretruei

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。