GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  OOPS
Go To First  |  Previous Question  |  Next Question 
 OOPS  |  Question 197 of 258    Print  
When will a constructor executed?

  
Total Answers and Comments: 1 Last Update: January 19, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
January 19, 2006 07:18:04   #1  
samiksc Member Since: October 2005   Contribution: 233    

RE: When will a constructor executed?
A constructor is executed when an object of a class is getting initialized (constructed)
 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : In C++, assignment and copy construction are different because the copy constructor initializes uninitialized memory, whereas assignment starts with an existing initialized object. If your class contains instances of other classes as data members, the ...

Latest Answer : A constructor is executed when an object of a class is getting initialized (constructed) ...

Can we call constructor of superclass directly without using super()method in subclass? if yes,explain,if no,why?

How could I, in C++ declare a class point. The class point has two private data members x and y of type float. The class point has a parameterized constructor to initialize both the data members i.e. x and y. The class point has a member function display() that display the value of x and y. Create two objects p1 and p2 with your desired data and display the values of x and y of p1 and p2. Now create a third object p3 by using the expression p3=p1+p2 and display the values of x and y of p3.
Read Answers (1) | Asked by : attique

Latest Answer : The answer is when instantiating an object compiler needs a correct object type. If the constructor is declared virtual then the the object type can not be resolved at compile time, and that's why it is not possible to declare a constructor as virtual. ...
Read Answers (4) | Asked by : gaurav

Latest Answer : It can be better explained in this way also.Thumb Rule When a copy constructor is called ? : when any object is created and it is being initialized with otherObject of same type Copy constructor  is called. Blv me this is is only one way how copy ...
Read Answers (2) | Asked by : preetha varma


 Sponsored Links

 
Related Articles

OOPS Tutorials

Object oriented programming OOP is a computer science term used to characterize a programming language that began development in the 1960’ s The term object oriented programming’ was originally coined by Xerox PARC to designate a computer application that describes the methodol
 

The Inheritance Concept In OOPs

The Inheritance Concept In OOPs In object oriented programming objects will be characterised by classes It is possible to learn a lot about an object based on the class it belongs to Even if you are not familiar with the name Maybach If I told you it is a car you would immediately know that it has f
 

Understanding The Message Concept In OOPs

Understanding The Message Concept In OOPs To understand object oriented programming you will need to become familiar with messages As the name implies a message is a process in which software objects will communicate with one another Because of this having one object is not enough mosgoogle An objec
 

Basic concepts of OOPS and Structure of C++ program

Basic concepts of OOPS and Structure of C program In this tutorial you will learn about Objects Classes Inheritance Data Abstraction Data Encapsulation Polymorphism Overloading Reusability Before starting to learn C it is essential that one must have a basic knowledge of the concepts of Object orie
 

Swing Extreme Testing - The Constructor Test

The Constructor Test A freshly constructed SaveAsDialog should be in a known state and we need to check the things we listed at the start of this chapter. mosgoogle geshibot language Java 5" public boolean constructorTest Note 1 init ; Note 2 Check the title. assert UI.getTitle ui.dialo
 

Be Prepared for Tech Job Cuts

Even one of the most flourishing and possibly the strongest industries of the future are not experiencing the economic crunch. The tech industry is now experiencing massive job losses in different categories. Although you will still see innovations almost every day from the tech industry through th
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape