Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

When is a memory allocated to a class?

Answer Posted / vineet makkar

The answer to this question lies in the basic difference
between
OBJECT & INSTANCE

INSTANCE : Refers to a reference of an object, it can be
null.

OBJECT: Actually pointing to the memory address of that
instance.

eg
Student stdnt; // Instance is created
Student stdnt = new Student; // Object is created

So, in short, memory is allocated to a class when the
object of the class is created using "new" keyword.

Is This Answer Correct ?    26 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is encapsulation used?

981


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

2447


Explain the concepts involved in Object Oriented programming.

1206


What is difference between abstraction and encapsulation?

1064


What is polymorphism and example?

1028


What is polymorphism explain?

1231


Why is abstraction used?

1079


What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?

2115


What is object in oop with example?

1214


What is abstraction oop?

1065


Can you explain polymorphism?

1094


What are the data types in oop?

1085


What is encapsulation oop?

1030


explain sub-type and sub class? atleast u have differ it into 4 points?

2302


i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

2303