Answers to Exam Questions

A1: A. and C. A fully encapsulated class declares its variables as private and provides methods to access the properties that these variables represent.
A2: A. Usage is TextArea(rows,columns).
A3: B. and C. NULL and main are not Java keywords.
A4: B. and C. The only non-alphanumeric characters that can appear in an identifier are _ and $.
A5: B. The postfix operator returns the value of x before incrementing U.
A6: A. The purpose of clipping is to restrict painting operations to the clipping region.
A7: C. When more than one event listener is added for an event, it's impossible to determine which listener will be invoked first.
A8: A., B., and D. The identifier name cannot be enclosed in brackets.
A9: C. The finally clause of ...

Get Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.