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 static block?

595


What is %d in printf?

534


What is the generic function?

531


Is java a utf 8 string?

536


How can you generate random numbers in java?

592






Differentiate between nested and inner class in java.

559


What is a stringbuilder?

515


How to solve the problem of generating the unique hash keys with hash function?

1463


Can we use a default constructor of a class even if an explicit constructor is defined?

657


What is java in simple terms?

566


Is c better than java?

548


Write a program to print 15 random numbers using foreach of java 8?

549


How do you define a method?

515


How can a gui component handle its own events in java programming?

542


What are jee technologies?

538