File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes what is instantiation in java ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what is instantiation in java ?" Watch "what is instantiation in java ?" New topic
Author

what is instantiation in java ?

bharath pathikonda ramesh
Greenhorn

Joined: Aug 29, 2005
Posts: 1
plseas its very urgent
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
creation of new object


SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Moving to Java In General (Beginner)...


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
Suppose u have a class...

class MyClass{
...
..

}

Somewhere you have a piece of code where u create a object of this class...


Myclass myObject=new MyClass();

This step creates an isntnace of the class...i.e. it instantiates an object of the class-MyClass..

Hope u ge the point..

Regards
BalajiS Sridharan
Greenhorn

Joined: Aug 29, 2005
Posts: 2
A class is basically a blueprint which u can use..., consider a class as a factory that will provide u with as many number of the blueprint as u need (which are called as objects)..., creating a object from a class is called instantiation.

U can instantiate a class by using the keyword new.
Steve Morrow
Ranch Hand

Joined: May 22, 2003
Posts: 657

Please make the extra effort to write out words such as "you". The extra keystrokes won't cost much in the way of time, and the enhanced clarity will be appreciated by those communicating on a forum with international readership.

http://faq.javaranch.com/view?UseRealWords
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: what is instantiation in java ?