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
(部分题目来源于网络,如有侵权,请联系文章作者删除。)