SCJP考试解析.docVIP

  • 8
  • 0
  • 约6.69万字
  • 约 57页
  • 2017-08-22 发布于江苏
  • 举报
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精品文档

相关文档