This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
1. equals() is overridden by :Boolean , Character , Integer , Long , Float , Double , String , and Bitset classes. it is NOT overridden by StringBuffer.Application of equals() to classes not overriding it will yield same result as ==. 2.The equals method defined by class Object for any reference values x and y, returns true if and only if x and y refer to the same object. Overridden by Boolean, Character, Integer,Long, Float,Double, String, and Bitset.
3.The general contract of hashCode is as follows: Whenever it is invoked on the same object more than once during an execution of a Java application, hashCode will return the same value. If two objects are equal according to the equals method , then calling the hashCode method on each of the will produce same result Copying an object by clone() method will typically entail creating a new instance of its class, but it also may require copying of internal data structures as well. 4. There is no public constructor for the class Class. The Java Virtual Machine automatically constructs Class objects as classes are loaded; such objects cannot be created by user programs. 5. public static void gc() Calling this method SUGGESTS that the JVM expend effort toward recycling discarded objects. in context of certification exam, we can only SUGGEST, not FORCE garbage collection. any more suggestions?