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 static class not inherited?

1108


What is oops with example?

1049


program for insertion ,deletion,sorting in double link list

2691


What is purpose of inheritance?

1109


What are the 4 main oop principles?

1225


What do you mean by variable?

1040


What is class encapsulation?

1096


What is inheritance write a program to show use of inheritance?

1147


What is the diamond problem in inheritance?

1138


What is difference between multiple inheritance and multilevel inheritance?

1150


What is oops?what is its use in software engineering?

1034


What is destructor example?

1047


What is encapsulation selenium?

1008


What are the data types in oop?

1102


Who invented oop?

1133