Java基础知识英文选择题3——Comment, exception, coding specification

1. The coding system used to represent characters in java is__?

A. bytecode

B. ascii

C. unicode

D. ebcdic

Correct Answer : C

2. What is the right way to handle abnormalities in input on java?

A. By handling these problems by providing exception handlers.

B. By writing while-loops to guard against bad input.

C. By using the class filefilter which gracefully filters out bad input data.

D. By always specifying the throws clause in every method header where file i/o is performed.

Correct Answer : A

3. Which of the following is not a legal identifier in java?

A. first_index

B. $first_index

C. 1index

D. index1

Correct Answer : C

4. According to the java code conventions, files longer than____lines should be___.

A. 100, encouraged

B. 2000, encouraged

C. 100, avoided

D. 2000, avoided

Correct Answer : D

5. According to javadoc convention, the first sentence of each javadoc comment should be___?

A. an @version tag

B. the order of lines is not important

C. an @author tag

D. a summary sentence of the declared entry

Correct Answer : D

6. The return for a method that returns nothing to its caller is__?

A. not specified in the method definition

B. N

C. null

D. void

Correct Answer : D

7. According to the document entitled code conventions for the java programming language, file suffixes used by java software include which of the following?

i. .obj

ii. .class

iii. .h

A. i and iii only

B. ii and iii only

C. i and ii only

D. ii only

Correct Answer : D

8. All java exception classes are derived from the class__?

A. java.lang.throwable

B. java.lang.error

C. java.io.ioException

D. java.lang.runtimeException

Correct Answer : A

9. A stack trace is__?

A. a sequence of method calls.

B. only available through a typical debugger's step into feature.

C. a fatal error that causes a typical debugger to terminate.

D. a list of variables allocated on a programmer's stack.

Correct Answer : A

10. Which of the following patterns of characters opens a javadoc comment block?

A. /*

B. /**

C. **/

D. //

Correct Answer : B

 (部分题目来源于网络,如有侵权,请联系文章作者删除。) 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值