It's not a secret anymore!
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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what is instantiation in java ?" Watch "what is instantiation in java ?" New topic

what is instantiation in java ?

bharath pathikonda ramesh

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: 980
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..

BalajiS Sridharan

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.
I agree. Here's the link:
subject: what is instantiation in java ?
It's not a secret anymore!