Exam Review
Official Sun Java objectives are shown below in italics.
Section 1: Declarations and Access Control
- A constructor can not be declared abstract or final
- Inner classes can access any static or member variable in the enclosing class.
- Only local variables that are declared final can be accessed by an inner class.
Section 2: Flow Control and Exception Handling
- Runtime exceptions do not have to be declared in the method.
Section 3: Garbage Collection
Section 4: Language Fundamentals
- Identify correctly constructed source files, package
declarations, import statements, class declarations (of
all forms including inner classes), interface declarations
and implementations (for java.lang.Runnable or other interface
described in the test), method declarations (including the
main method that is used to start execution of a class),
variable declarations and identifiers.
- State the correspondence between index values in the
argument array passed to a main method and command line
arguments.
- Identify all Java programming language keywords and
correctly constructed identifiers.
- State the effect of using a variable or array element
of any kind when no explicit assignment has been made to
it.
- State the range of all primitive data types and declare
literal values for String and all primitive types using
all permitted formats, bases, and representations.
- Unicode literals always start with \u and have four hexadecimal
digits in upper or lower case.
Section 5: Operators and Assignments
Section 6: Overloading, Overriding, Runtime type, and Object Orientation
Section 7: Threads
Section 8: The java.awt Package
Section 9: The java.lang Package
Section 10: The java.util Package
- hashcode() is a method on the java.util.Object class and
therefore is a method in all classes. The hashcode() method
returns an int representing the location in memory of the
subject Object. The equals() method uses the hashcode()
method to compare two objects. If the memory location returned
by both hashcode() methods is the same the equals() method
will return true. If you override or change the hashcode()
method the equals() method should be modified as well.
Section 11: The java.io Package