A soft reference holds onto its referent until memory becomes low.
// Create up the soft reference.
SoftReference sr = new SoftReference(object);
// Use the soft reference.
This example gets an object's fully qualified name in its own namespace.
try {
Context obj = (Context)childCtx.lookup("grandChild");
String fullname = obj.getNameInNamespace();
The hash code of an object is an integer value that's computed using the value of the object. For example, for a String object, the characters of the string are used to compute the hash code. For an I
Object o = new String();
Class sup = o.getClass().getSuperclass(); // java.lang.Object
// Superclass of Object is null
o = new Object();
sup = o.getClass().getSuperclass();