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 polymorphism is used in oops?

1109


What is abstraction in oops?

1098


Can a destructor be called directly?

1140


What is class and object in oops?

1218


What is abstract class in oop?

1067


What is the difference between a mixin and inheritance?

1042


What is the use of oops?

1120


What is destructor oops?

1157


What are the components of marker interface?

1110


What is polymorphism used for?

1113


what is the sylabus for priliminaries?

2229


Explain virtual inheritance?

1257


What is static modifier?

1332


What are two types of polymorphism?

1125


Is enum a class?

1117