选择题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转载请标明出处.