杭州天丽科技有限公司-JAVA高级程序员.doc

杭州天丽科技有限公司-JAVA高级程序员.doc

ID:51486681

大小:239.00 KB

页数:8页

时间:2020-03-25

杭州天丽科技有限公司-JAVA高级程序员.doc_第1页
杭州天丽科技有限公司-JAVA高级程序员.doc_第2页
杭州天丽科技有限公司-JAVA高级程序员.doc_第3页
杭州天丽科技有限公司-JAVA高级程序员.doc_第4页
杭州天丽科技有限公司-JAVA高级程序员.doc_第5页
资源描述:

《杭州天丽科技有限公司-JAVA高级程序员.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、杭州天丽科技有限公司JAVA高级程序员选择题1:1.What will be the result of executing the following code?   2. boolean a = true;  3. boolean b = false;  4. boolean c = true;  5. if (a == true)  6. if (b == true)  7. if (c == true)    System.out.println("Some things are true in this world"

2、);  8. else       System.out.println("Nothing is true in this world!");  9.  else if (a && (b = c))  System.out.println("It's too confusing to tell what is true and what is false");  10.  else   System.out.println("Hey this won't compile");   11.  12.Choices:  Whatw

3、illbetheresultofexecutingthefollowingcode?booleana=true;booleanb=false;booleanc=true;if(a==true)if(b==true)if(c==true)System.out.println("Somethingsaretrueinthisworld");elseSystem.out.println("Nothingistrueinthisworld!");elseif(a&&(b=c))System.out.println("It'stooco

4、nfusingtotellwhatistrueandwhatisfalse");elseSystem.out.println("Heythiswon'tcompile");Choices:A.Thecodewon'tcompileB."Somethingsaretrueinthisworld"willbeprintedC."Heythiswon'tcompile"willbeprintedD.Noneofthese2:Whichofthefollowingstatementsaretrue?A.Theautomaticgarb

5、agecollectionoftheJVMpreventsprogramsfromeverrunningoutofmemoryB.AprogramcansuggestthatgarbagecollectionbeperformedandforceitC.GarbagecollectionisplatformindependentD.Anobjectbecomeseligibleforgarbagecollectionwhenallreferencesdenotingitaresettonull.3:1.What will ha

6、ppen when you attempt to compile and run the following code?   2.  3.class Base   4.  1.{  2.  3.int i = 99;   4.  5.public void amethod()  6.  7.{  8.  9.       System.out.println("Base.amethod()");  10.  11.     }  12.  13.     Base()  14.  15.{  16.  17.     amet

7、hod();  18.  19.     }  20.  21.}   22.  23.public class Derived extends Base  24.  25.{  26.  27.int i = -1;  28.  29.         30.  31.public static void main(String argv[])  32.  33.{  34.  35.     Base b = new Derived();  36.  37.       System.out.println(b.i);  

8、38.  39.       b.amethod();  40.  41.     }   42.  43.     public void amethod()  44.  1.{  2.  3.       System.out.println("Derived.ameth

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

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

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