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
What is object in oop?
What is for loop and its syntax?
Why it is called runtime polymorphism?
What is oops?what is its use in software engineering?
What is oops concept with example?
What is pure oop?
Whats oop mean?
What is constructor in oop?
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
What is destructor oops?
Can bst contain duplicates?
Which type does string inherit from?
What is abstraction in oop with example?
What is abstraction encapsulation?
What is debug class?what is trace class? What differences are between them? With examples.