下载此文档

北京达内科技有限公司 Java培训讲师.doc


文档分类:管理/人力资源 | 页数:约15页 举报非法文档有奖
1/15
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/15 下载此文档
文档列表 文档介绍
选择题1:在软件生命周期中,下列哪个说法是不准确的?、开发和运行三个阶段2:Which is the most appropriate code snippet that can be inserted at line 18 in the following code?    (Assume that the code piled and run with assertions enabled)    1.  import .*;    2.     3.  public class AssertTest    4.  {    5.      private tld;    6.         7.      public AssertTest()    8.      {    9.          cctld = new HashMap();    10.         ("in", "India");    11.         ("uk", "United Kingdom");    12.         ("au", "Australia");    13.         // more code...     14.     }    15.     // other methods ....      16.     public String getCountry(String countryCode)    17.     {    18.         // What should be inserted here?    19.         String country = (String)(countryCode);    20.         return country;    21.     }    22. }  Whichisthemostappropriatecodesnippetthatcanbeinsertedatline18inthefollowingcode?(piledandrunwithassertionsenabled).*;.{;()8.{tld=newHashMap();10.("in","India");11.("uk","UnitedKingdom");12.("au","Australia");13.//morecode...14.}15.//othermethods....(StringcountryCode)17.{18.//Whatshouldbeinsertedhere?=(String)(countryCode);;21.}22.}countryCode!=null;countryCode!=null:"Countrycodecannotbenull";cctld!=null:"Nocountrycodedataisavailable";cctld:"Nocountrycodedataisavailable";3:Give the following code:  public class Example{  public static void main(String args[] ){  int l=0;  do{  (“Doing it for l is:”+l);  }while(--l>0)  (“Finish”);  }  }  Which well be output:   Givethefollowingcode:lassExample{publicstaticvoidmain(Stringargs[]){intl=0;do{(“Doingitforlis:”+l);}while(--l>0)(“Finish”);}}Whichwellbeoutput:itforlis3itforlis1itforlis2itforlis04:Give this class outline:  class Example{  private int x;  //rest of class body…  }  Assuming that x invoked by the code java Example, which statement can made x be directly accessible in main() method of ?  Givethisclassoutline:classExample{pri

北京达内科技有限公司 Java培训讲师 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数15
  • 收藏数0 收藏
  • 顶次数0
  • 上传人书犹药也
  • 文件大小263 KB
  • 时间2019-11-30
最近更新