JAVA_经典_基础试题.docVIP

  • 14
  • 0
  • 约9.66千字
  • 约 8页
  • 2018-01-05 发布于河南
  • 举报
JAVA_经典_基础试题

JAVA基础考试题 (请勿在此卷上填写答案,请将答案写在答题卡上,考试时间90分钟,总分102分) 一、选择题(每题2分,共42分;错选不给分;少选给1分) 1 ==== 1. public class test { 2. public static void main (String args[]) { 3. int i = 5; 4. int j = i2; 5. 6. } 7. } What is the decimal value of j at line 5? A. 0 B. 1 C. 20 D. -15 E. An error at line 3 causes compilation to fail. F. An error at line 4 causes compilation to fail. 2 ==== Integer i = new Integer (42); Long l = new Long (42); Double d = new Double (42.0); Which expressions evaluate to True? A. (i == l) B. (i == d) C. (d == l) D. (i.equals (d)) E. (d.equals (i)) F. (i.equals

文档评论(0)

1亿VIP精品文档

相关文档