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 |
I am developing a payroll system mini project.I used file concept in program for reading and writing.When the program is reloading into the memory that is if i execute next time the file was cleaned and adding data from the starting this is my problem.I want to strore the previous data and if i want to add any record that should be next of previous data.Please help me.
What is overriding in oop?
What is meant by oops concept?
What is solid in oops?
Do you know about multiple inheritance?
what is the difference between <stdio.h>and "stdio.h"?
What is destructor give example?
What is a superclass in oop?
how to swap the variables without using temp and operators
Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?
Can abstract class have normal methods?
Prepare me a program for the animation of train