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 ? | 30 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 difference between #define and const?
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?
How do you define a class in oop?
What is overriding in oop?
what is the virtual function overhead, and what is it used for ? i hope i can get and appropriate answers, thanks a lot....
What are generic functions and generic classes?
WHAT IS THE DIFFERENCE BETWEEN OBJECT BASED & OBJECT ORIENTD PROGRAMMING LANGUAGE.(GIVE AT LIST 4 PIONT)
what are the uses of C++
When you define a integer it gets stored in which data structure?(Stack or a heap)
why the memory allocated with new cant be freed using free()