Chapter 4. Declarations and Access Control

OBJECTIVES

This chapter helps you prepare for the exam by covering the following objectives from the “Declarations and Access Control” section of the Sun testing objectives. These objectives are also given additional coverage in Chapter 6, “Overloading, Overriding, Runtime Type, and Object Orientation.”

Write code that declares, constructs, and initializes arrays of any base type using any of the permitted forms both for declaration and for initialization.

  • Knowing the rules for array declarations is important. You can expect to see one or two questions that require thorough knowledge of the array declaration syntax.

Declare instance variables, static variables, and automatic (method local) variables ...

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.