选择题 1: 下面关于变量及其范围的陈述哪些是错的。 A. 实例变量是类的成员变量。 B. 实例变量用关键字 static 声明。 C. 在方法中定义的局部变量在该方法被执行时创建 D. 局部变量在使用前必须被初始化。 2: 1. What will be printed when you execute the following code? 2. 3. class X 4.{ = new Y(); 6. X() 7.{ 8. ( "X" ); 9.} 10. } 11. 12. class Y 13. { 14. Y() 15. { 16. ( "Y" ); 17. } 18. } 19. 20. public class Z extends X 21. { 22. Yy= new Y(); 23. Z() 24. { 25. ( "Z" ); 26. } 27. public static void main(String[] args) 28. { 29. new Z(); 30. } 31. } 32. 33. Choices: 3: 1. Give the code fragment: 2. if (x> 4 ){ 3. ( “ Test 1”);} 4. else if (x> 9 ){ 5. ( “ Test 2”);} 6. else { 7. ( “ Test 3”);} 8. Which range of value x would produce of output “ Test 2”? <4 >4 >9 4: Which declares for native method ina java class corrected? native void method(){} native void method(); native method(); void native method(); 5: 使用 JDBC 可以做到的是 A. 把二进制代码传送到任何关系数据库中 Java 源代码传送到任何关系数据库中 C. 把表单信息传送到任何关系数据库中 D. 很容易地把 SQL 语句传送到任何关系数据库中 6: 鉴于 Java 的特点,它最适合的计算环境是 A. 并行计算环境 B. 分布式计算环境 C. 高强度计算环境 D. 开放式计算环境 7: 在下述选项时, 没有构成死循环的程序是 i=100 while (1) { i=i%100+1; if (i>100) break; } (;;); k=1000; do { ++k; }while(k>=10000); s=36; while (s);--s; 8: What is written to the standard output given the followin
达内科技java面试笔试 来自淘豆网m.daumloan.com转载请标明出处.