When is an object created and what is its lifetime?

Answers were Sorted based on User's Feedback



When is an object created and what is its lifetime?..

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 ?    30 Yes 8 No

When is an object created and what is its lifetime?..

Answer / nikhil

global scope,if created outside class n local scope if
created inside a class......

Is This Answer Correct ?    3 Yes 2 No

When is an object created and what is its lifetime?..

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

When is an object created and what is its lifetime?..

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

Post New Answer

More OOPS Interview Questions

What is difference between #define and const?

3 Answers   emc2,


write a c++ code to overload + and - for a stack class such that + provides push and - provides pop operation

1 Answers   College School Exams Tests, HCL, IBM, TCS,


is java purely oop Language?

49 Answers   HCL, Infosys, TCS,


what is opps?why it is use in programming language?

2 Answers   Wipro,


How do you define a class in oop?

0 Answers  






What is overriding in oop?

0 Answers  


what is the virtual function overhead, and what is it used for ? i hope i can get and appropriate answers, thanks a lot....

6 Answers  


What are generic functions and generic classes?

5 Answers  


WHAT IS THE DIFFERENCE BETWEEN OBJECT BASED & OBJECT ORIENTD PROGRAMMING LANGUAGE.(GIVE AT LIST 4 PIONT)

1 Answers   TCS,


what are the uses of C++

1 Answers  


When you define a integer it gets stored in which data structure?(Stack or a heap)

2 Answers   emc2,


why the memory allocated with new cant be freed using free()

2 Answers  


Categories