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 is ide with example?
How to sort a collection of custom Objects in Java?
I am a fresher and know core java, c languge, html, css etc if I am illegible for any job then send it on my email tatranakshay276@gmail.com
Explain implementation and how is it different from conversion?
What is a default constructor and also define copy contrucyor?
Can size_t be negative?
How do you do exponents in java?
How do you declare an empty string?
Can an arraylist be empty?
Where are register variables stored?
What is the difference between static method and instance method in Java?
What is the use of 'super' keyword inside a constructor?
How do you use equal in java?
How do you convert an int to a double in java?
What is exception propagation?