- 20
- 0
- 约2.7万字
- 约 31页
- 2018-01-05 发布于河南
- 举报
2009-9-18-JAVA面试题
(1)
1. public class test { 2. public static void main (String args[]) {3. int i = 0xFFFFFFF1;4. int j = ~i;5.6. }7. }
第五行中,J的十进制数值是多少?A. 0B. 1C. 14D. –15E. 第三行编译错误。F. 第四行编译错误。
(2)
Integer i = new Integer (42);Long 1 = new Long (42);Double d = new Double (42.0);哪两个表达式的值是真?(选择两项)
A. (i ==1)B. (i == d)C. (d == 1)D. (i.equals (d))E. (d.equals (i))F. (i.equals (42))
(3)1. public class test {2. private static int j = 0;3.4. private static boolean methodB(int k) {5. j += k;6. return true;6. }7.8. public static void methodA(int i) {9. boolean b:10. b = i 10 | methodB
原创力文档

文档评论(0)