Thursday, April 19, 2007

class.Forename

Why We do not create Object of Class.forename();


What is Class class

It is a Class of declared class type.
Not have any public constructor, so due to this we can not create object of any class . and forName() is a static method, so it will cal with the help of class. This forName method take fully qualified class path which we want to execute at initialised time with the help of class loader.

java.lang Class Classjava.lang.Object
java.lang.Class
All Implemented Interfaces:
Serializable
public final class Class
extends Object
implements SerializableInstances of the class Class represent classes and interfaces in a running Java application.

Class has no public constructor. Instead Class objects are constructed automatically by the Java Virtual Machine as classes are loaded and by calls to the defineClass method in the class loader.

No comments:

Global Tech Soft Solution

Smart software solution.

Webdesigning, software Development & Consultant GlobalTech Soft Solution