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 |
what is inline function?
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
How to calculate the age from the date of birth by using the program?
What is function overloading and operator overloading?
What is an orthogonal base class?
Difference between new operator and operator new
Program to read a comment string
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
Can main method override?
What are the four main oops concepts?
Why a "operator=(...)" when there is a copy ctor?
What is the purpose of enum?