35道SCJP试真题精解.docVIP

  • 4
  • 0
  • 约2.58万字
  • 约 15页
  • 2016-10-12 发布于广东
  • 举报
35道SCJP试真题精解

35道SCJP考试真题精解例题1:   Choose the three valid identifiers from those listed below.   A. IDoLikeTheLongNameClass   B. $byte   C. const   D. _ok   E. 3_case   解答:A, B, D   点评:Java中的标示符必须是字母、美元符($)或下划线(_)开头。关键字与保留字不能作为标示符。选项C中的const是Java的保留字,所以不能作标示符。选项E中的3_case以数字开头,违反了Java的规则。   例题2:   How can you force garbage collection of an object?   A. Garbage collection cannot be forced   B. Call System.gc().   C. Call System.gc(), passing in a reference to the object to be garbage collected.   D. Call Runtime.gc().   E. Set all references to the object to new values(null, for example).   解答:A   点评:在Java中垃圾

文档评论(0)

1亿VIP精品文档

相关文档