getSuperClass() is used to get the name of superclass. Review the code below:

Java Code:
	    	 Object obj = new String();
	    	 Class sup = obj.getClass().getSuperclass();
	    	 System.out.println(sup.toString());
	    	    
	    	 Vector vec = new Vector();
	    	 sup = vec.getClass().getSuperclass();
	    	 System.out.println(sup.toString());
Output:
Java Code:
class java.lang.Object
class java.util.AbstractList