Java Reference
In-Depth Information
Understand call by value. I can guarantee at least two or three questions on the exam that
have an argument passed into a method and the method alters the parameter. Understand
that a method cannot change the argument. The only effect a method can have on an argu-
ment is when the argument is a reference, in which case the method can alter the object
that the reference points to.
Be able to determine when an object becomes eligible for garbage collection. Knowing
when an object is eligible for garbage collection demonstrates an important understanding
of Java and how it creates and destroys objects. You will see at least one question on the
exam that asks you when an object is eligible for garbage collection, and also at least one
question involving the Object.finalize() method.
Understand the difference between == and the equals method. Use the == comparison
operator to determine if two primitive types are equal and also to determine if two refer-
ences point to the same object. Use the equals method to determine if two objects are
“equal,” which is whatever equality means in the business logic of the class.
Familiarize yourself with the Java operators. The Java operators are a fundamental aspect
of the language, and almost all of the exam questions that contain sample code use one or
more of the Java operators.
Search WWH ::




Custom Search