Does a class inherit the constructor of its super class?if
it does, how can you hide that constructor? if it doesnot
how can you call it from the sub class?

Answer Posted / pandu

Hi ,
constructor is never been inherited from superclass to
subclass.
we can call the Super class constructor in Sub class
by using
Super();
that too this stement should be first line in method.

Best Regards.

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is java a utf 8 string?

535


String class is defined under which package in java?

625


Can a string be null?

546


When parseint method can be used?

543


Explain java heap space and garbage collection?

591






What isan abstract class and when do you use it?

848


What is a map? What are the implementations of map?

571


How do you add an element to an arraylist in java?

492


What does replaceall do in java?

492


What is nested loop? What is dangling else condition in it?

575


Which class contains a method: cloneable or object?

542


What is port number in java?

597


What is style and indentation?

558


What is the escape character in java?

517


What is a qualifier in a sentence?

532