All About Class Class in Java

This is a very interesting Class called Class in java. Instance of the Class Class only represents classes and interfaces in the java applications. There are no member elements and public constructors available for Class Class. Class objects are constructed automatically by JVM when Classes are loaded into JVM and by the help of the method defineClass()[it stays in ClassLoader Class]
Below is the structure of Class -Class

public final Class java.lang.Class extends java.lang.Object
{
//methods
public static Class forName(String ClassName);
public ClassLoader getClassLoader();
public Class[] getInterfaces();
public Class getSuperClass();
public String getName();
public boolean isInterface();
public Object newInstance();
public String toString();
}
 
All About Class Class in Java All About Class Class in Java Reviewed by Animesh Chatterjee on September 06, 2018 Rating: 5

No comments:

Powered by Blogger.