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
What are actual parameters?
What is Classloader in Java?
What do the thread?class methods run() and start() do?
What is int lol?
Why is the singleton pattern considered to be an anti pattern?
What is a variable analysis?
How do you delete a list in java?
In a class implementing an interface, can we change the value of any variable defined in the interface?
Does java return by reference?
Explain OOPs concept.
How do you print array in java?
What is the maximum size of byte array in java?
What is final modifier?
What is abstraction in java?
What environment variables do I need to set on my machine in order to be able to run java programs?