When is an object created and what is its lifetime?
Answers were Sorted based on User's Feedback
Answer / apurva jain
Object is created when constructor has to be invoked or
when have to access the class.Its Lifetime is throughout
the Execution of that Class.
| Is This Answer Correct ? | 31 Yes | 8 No |
Answer / nikhil
global scope,if created outside class n local scope if
created inside a class......
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / alok pandey
When the constructor called then object created thus while
the programme execute till life of object
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / yathirajulu
whenever developer is required, and the life-time is when we
assinging null or close the program(application).
| Is This Answer Correct ? | 2 Yes | 14 No |
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
What is solid in oops?
There are 2 empty jars of 5 and 3 liters capacity. And a river is flowing besides. I want to measure 4 liters of wanter using these 2 jars. How do you do this?
wht is major diff b/w c and c++?
What is the real time example of encapsulation?
Why interface is used?
What is multidimensional array?
What do you mean by inheritance?
what is the function of 'this' operator ?
What is basic concept of oop?
How to create a comment page in C #??
Can main method override?