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

What is object in oop?

1060


What is for loop and its syntax?

1033


Why it is called runtime polymorphism?

1045


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

972


What is oops concept with example?

967


What is pure oop?

1047


Whats oop mean?

988


What is constructor in oop?

1018


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

2089


What is destructor oops?

1032


Can bst contain duplicates?

1142


Which type does string inherit from?

1060


What is abstraction in oop with example?

1060


What is abstraction encapsulation?

1059


What is debug class?what is trace class? What differences are between them? With examples.

2132