A.4 The Questions

Types of Questions Asked

Most of the questions follow some common form that requires candidates to apply their knowledge in a special way.

  • Analyzing program code.

    The question provides a source code snippet and asks a specific question pertaining to the snippet. Will running the program provide the expected result? What will be written to the standard output when the program is run? Will the code compile?

  • Identifying true or false statements.

  • Naming specific classes or members.

When analyzing program code, it is useful to try to apply the same rules as the compiler: examining the exact syntax used rather than making assumptions on what the code tries to accomplish.

The wording of the questions is precise, and expects the responses selected in multiple-choice questions to be precise. This often causes the test to be perceived as fastidious. Close attention should be paid to the wording of the responses in a multiple-choice question.

None of the questions are intentionally meant to be trick questions. Exam questions have been reviewed by both Java experts and language experts, to remove as much ambiguity from the wording of the questions as possible.

Since the program used in the exam will select and present the questions in a random fashion, there is no point in trying to guess the form of the questions. The order of the answers in multiple choice questions has been randomized and, thus, has no significance.

Types of Answers Expected

The majority of the questions are multiple choice. All of the appropriate and none of the inappropriate choices must be selected for the question as a whole to be considered correctly answered.

A rarer form of question expects the candidate to type in short answers.

There should be no problem identifying which form of answer each question requires. The wording of the questions will indicate this, and the software used will present the candidate with an input method corresponding to the form of answer expected.

For multiple-choice questions, the program will ask the candidate to select a specific number of answers from a list. Where a single correct answer is expected, radio buttons will allow the selection of only one of the answers. The most appropriate response should be selected.

In questions where all appropriate responses should be selected, checkboxes will allow the selection of each response individually. In this case, all choices should be considered on their own merit. They should not be weighed against each other. It can be helpful to think of each of the choices for the question as an individual true?false question.

Care should be exercised when answering a question requiring all appropriate responses to be selected. A common mistake is to select only one of the appropriate responses, as a result of assuming the question has only one correct answer.

For short-answer type-in questions, the program will present a text field in which the answer should be typed. As with all other answers, these fill-in answers will be judged by the computer. It is, therefore, a common concern that seemingly correct answers can be rejected because of minute differences from the correct answer that the program holds. These concerns are usually unfounded. The program allows the candidate a certain amount of flexibility, and will most often accept several variations of an answer. However, answers should be typed in with extra care. Attention should be paid to correct spelling and capitalization. Some questions describe the exact format of the answer expected.

Topics Covered by the Questions

Topics covered by the exam are basically derived from the set of objectives defined by Sun for the programmer exam. These objectives are included in Appendix B together with study notes that highlight important topics to study for the exam. All the major topics are covered extensively in the relevant chapters of the book.

The ultimate goal of the exam is to differentiate experienced Java programmers from the rest. Some of the questions are, therefore, aimed at topics that new Java programmers usually find difficult. Such topics include:

  • casting and conversion

  • polymorphism, overriding, and overloading

  • exceptions and try-catch-finally blocks

  • thread control

  • nested classes

Knowledge obtained from studying other languages such as C++ should be used with care. Some of the questions often seem to lead astray C++ programmers who have not grasped the many differences between C++ and Java. Those with a C++ background should pay special attention to the following Java topics:

  • use null, not NULL

  • use true and false, not 1 and 0.

  • signed and unsigned shifts

  • widening conversions

  • conditional and boolean logic operators

  • labeled statements

  • accessibility rules

  • how polymorphism works

Some of the questions may require intimate knowledge of the core APIs. This book covers the most important classes and methods of the API, but it does not go as far as listing every member of every class. The Java API reference documentation for the Java 2 SDK should be consulted. It is essential that readers familiarize themselves with the relevant parts of API documentation. There are API references readily available from many sources.