Witscale Test Center

SCJP Objectives covered


SCJP Objectives covered

Section 1: Declarations and access control

 

1.2 Declare classes, nested classes, methods, instance variables, static variables and automatic (method local) variables making appropriate use of all permitted modifiers (such as public, final, static, abstract, etc.). State the significance of each of these modifiers both singly and in combination and state the effect of package relationships on declared items qualified by these modifiers.

 

Section 4: Language Fundamentals

 

4.1 Identify correctly constructed package declarations, import statements, class declarations (of all forms including inner classes) interface declarations, method declarations (including the main method that is used to start execution of a class), variable declarations, and identifiers.

 

Section 6: Overloading, Overriding, Runtime Type and Object Orientation

 

6.3 Write code to construct instances of any concrete class including normal top level classes and nested classes.

 

 

In this chapter, we will discuss what the nested classes are and why we need them. You will learn about basic syntax and semantics of a nested class. You will also learn about the four categories of nested classes based on their scope and accessibility.

Nested classes do not have an entire SCJP objective devoted to them, but objectives related to declarations (Section 1.2, 4.1 and 6.3) require thorough knowledge of nested classes. You also need to know about nested classes while answering SCJP questions based on any other topics as they might include nested classes in the code samples.