All About Class Class in Java

0
40
Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

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();
}
Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

LEAVE A REPLY

Please enter your comment!
Please enter your name here