Opening Hours :7AM to 9PM
Before creating an object no memory allocate for the class variables at the time of declaration.without allocation of memory space no operation can be performed.To overcome this problem we must create sufficient memory space technically called instantiation of class(in general it is called object creation).
In java language object is instance of class(instance allocation of memory space).
classname objref=new classname();
In the above syntax new keyword or special operator in java. It is used to allocate sufficient memory space for the all variable of class at runtime.
object reference can be userdefined name and that holds address of the new memory location.
objref.variablename;
which can be access the variable name of the class.
objref.methodname();
which can be access method name of class.