Originally posted by Paul Sturrock:
Have a read through our JDBC FAQs. This question get asked a lot.
there can be serious problems with the use of HashMap and HashSet (and similar structures) if the hashCode() is calculated from the value of the member variables (which is typical) if they are allowed to change.
if you don't want the behavior of the object to be changed by anyone. String is made immutable in order to standardize its behavior.
You can call super.display() but only from inside a subclass object (ie not static).