Java Reference
In-Depth Information
Chapter
2
Declarations,
Initialization, and
Scoping
SCJP EXAM OBJECTIVES COVERED IN
THIS CHAPTER:
Develop 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).
Develop code that declares an interface. Develop code
that implements or extends one or more interfaces.
Develop code that declares an abstract class. Develop
code that extends an abstract class.
Develop code that declares, initializes, and uses primi-
tives, arrays, enums, and objects as static, instance, and
local variables. Also, use legal identifiers for variable
names.
Develop code that declares both static and non-static
methods, and — if appropriate — use method names that
adhere to the JavaBeans naming standards. Also develop
code that declares and uses a variable-length argument
list.
Given a code example, determine if a method is correctly
overriding or overloading another method, and identify
legal return values (including covariant returns), for the
method.
Given a set of classes and superclasses, develop construc-
tors for one or more of the classes. Given a class declara-
tion, 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.
Search WWH ::




Custom Search