文档介绍:java 笔试题 java 软件开发工程师笔试题发布时间:2011-06-11 (来源: 应届毕业生求职网) 选择题 1: in the following code, which is the earliest statement, where the object originally held in e, may be garbage collected: class test { 2. public static void main (string args []) { 3. employee e= new employee("bob", 48); 4. (); 5. (()); = null; = new employee("denise", 36); 8. (); 9. (()); 10. } 11.} only one: in the following code, which is the earliest statement, where the object originally held in e, may be garbage collected: class test { 2. public static void main (string args []) { 3. employee e= new employee("bob", 48); 4. (); 5. (()); = null; = new employee("denise", 36); 8. (); 9. (()); 10. } 11.} only one: 10 11 7 8 2:exhibit : 1. public class test ( 2. private static int j= 0; 3. 4. private static boolean methodb(int k)( += k; 6. return true; 6.) 7. 8. public static void methoda(int i){ 9. boolean b: 10. b=i< 10| methodb (4); 11. b=i< 10 || methodb (8); 12. ) 13. 14. public static void main (string args[] }( 15. methoda (0); 16. (j); 17. ) 18. ) what is the result? program prints “0” program prints “4” program prints “8” program prints “ 12” 3:what is written to the standard output given the following statement:(4|7); select the right answer: 4: select valid identifier of java: select valid identifier of java: a.%passwd c.$charge 5: 设有变量说明语句 int a=1,b=0; 则执行以下程序段的输出结果为()。 switch (a) { case 1: switch (b) { case 0:printf("**0**");break; case 1:printf("**1**");break; } case 2:printf("**2**");break; } printf(" "); a.**0** b.**0****2** c.**0****1****2** d. 有语法错误 6:in the following pieces of code, which one pile without any error? sb1 = "abcd";