2023年全国软考程序员考试部分例题.docVIP

  • 6
  • 0
  • 约5.53千字
  • 约 21页
  • 2023-08-15 发布于北京
  • 举报
全国软考程序员考试部分例题 全国软考程序员考试部分例题全国软考程序员考试部分例题例题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 点评:

文档评论(0)

1亿VIP精品文档

相关文档