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 size_t?

721


What is internal iteration in java se 8?

868


List some oops concepts in java?

789


Name few java util classes introduced with java 8 ?

715


A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.

772


Why heap memory is called heap?

780


Can we create our own daemon thread?

735


What do you mean by boolean?

815


What is the escape character in java?

732


Does set allows null in java?

710


What are constructors in java?

769


In the below example, how many string objects are created?

779


What are the data types supported by java? What is autoboxing and unboxing?

764


What do you understand by casting in java language?

801


What is the use of static class?

784