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 are actual parameters?

519


What is Classloader in Java?

634


What do the thread?class methods run() and start() do?

536


What is int lol?

590


Why is the singleton pattern considered to be an anti pattern?

469






What is a variable analysis?

634


How do you delete a list in java?

532


In a class implementing an interface, can we change the value of any variable defined in the interface?

555


Does java return by reference?

531


Explain OOPs concept.

645


How do you print array in java?

552


What is the maximum size of byte array in java?

538


What is final modifier?

556


What is abstraction in java?

613


What environment variables do I need to set on my machine in order to be able to run java programs?

601