Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 8. Nested Type Declarations

8. Nested Type Declarations

Exam Objectives

1.1Develop code that declares classes (including abstract and all forms of nested classes), interfaces, and enums, and includes the appropriate use of package and import statements (including static imports).
1.6Given a set of classes and superclasses, develop constructors for one or more of the classes. Given a class declaration, determine if a default constructor will be created and, if so, determine the behavior of that constructor. Given a nested or non-nested class listing, write code to instantiate the class.


Supplementary Objectives

  • State which nested classes create instances that are associated with instances of the enclosing context.

  • State the access rules that govern accessing entities in the enclosing context of nested classes and write code that uses the augmented syntax involving the this keyword for this purpose.

  • State whether a definition of a nested class can contain static and non-static members.

  • Distinguish between the inheritance hierarchy and the enclosing context of any nested class or interface.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial