Java Reference
In-Depth Information
Understand polymorphism. Polymorphism, where an object can take on many forms,
is one of the most important concepts in OO programming. Be sure to recognize when
a parent class reference is pointing to a child class object, as well as when that reference
needs to be cast to a child class type.
Understand the instanceof operator. Use the instanceof operator to avoid a ClassCast-
Exception when you are unsure of the actual data type of a reference that needs casting.
Understand virtual method invocation. By default, Java methods behave like virtual
methods, meaning that overridden methods are invoked at runtime, no matter which
method the compiler sees at compile time.
Search WWH ::




Custom Search