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
Why is static class not inherited?
What is oops with example?
program for insertion ,deletion,sorting in double link list
What is purpose of inheritance?
What are the 4 main oop principles?
What do you mean by variable?
What is class encapsulation?
What is inheritance write a program to show use of inheritance?
What is the diamond problem in inheritance?
What is difference between multiple inheritance and multilevel inheritance?
What is oops?what is its use in software engineering?
What is destructor example?
What is encapsulation selenium?
What are the data types in oop?
Who invented oop?