Can you call a constructor within a constructor?

Answer Posted / nikhlesh gupta datia(m.p.)

We can call one of base class constructor inside derive class constructor by using predefine variable "super()" such as super(a), super(a,b) and so on.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to reverse a number in java?

547


What is the difference between the size and capacity of a vector?

557


What are static methods?

564


What are the difference between composition and inheritance in java?

500


What are the new features in java 8?

552






What is preflight request?

516


Explain list interface?

501


Write a function to print Fibonacci series and Tribonacci series?

740


What will be the initial value of an object reference which is defined as an instance variable?

621


What is the purpose of nested class in java?

588


What does the @override annotation do?

546


can used Protected Class outside Function.?

600


What is the syntax and characteristics of a lambda expression? Explain

533


Can we execute a program without main() method?

518


Explain the importance of import keyword in java?

514