Can we inherit the constructor in a Class?please give one
example.

Answer Posted / harivirat reddy

Constructors are not inherited because extending class must
contain diffent name but constructors class name and
constructor name must be similer.but we can inherit the
constructors by using 'super' keyword.

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a treeset in java?

770


Why is java called java?

809


What are the steps that are followed when two computers connect through tcp?

774


What is return null in java?

721


What is thread life cycle in java?

831


What languages are pass by reference?

796


What is token in java?

786


What happens when a thrown exception is not handled?

807


Difference between class#getinstance() and new operator ?

901


How do you sort a string in java?

741


What is a ternary operator in java?

771


What is the difference between static method and instance method in Java?

839


How to restrict a member of a class from inheriting by its sub classes?

1091


What is an escape character in java?

792


What are dot operator queries?

876