what are the ways in which a constructors can be called?

Answer Posted / king

A constructor can be called implicitly or explicitly.
When an object of class is created the constructor is 
implicitly called.
When we create an object we desired properties, we call the 
constructor explicitly. 

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Plese get me a perfect C++ program for railway/airway reservation with all details.

3427


What are the benefits of polymorphism?

619


Write a program to sort the number with different sorts in one program ??

1914


Can enum be null?

583


Who invented oop?

651






write a program to find 2 power of a 5digit number with out using big int and exponent ?

1893


What is persistence in oop?

669


What is encapsulation selenium?

554


What is property in oops?

565


Can main method override?

583


What is the types of inheritance?

602


What is polymorphism in oop example?

513


What is polymorphism programming?

601


Why is polymorphism important in oop?

629


What is difference between multiple inheritance and multilevel inheritance?

601