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
Is java a utf 8 string?
String class is defined under which package in java?
Can a string be null?
When parseint method can be used?
Explain java heap space and garbage collection?
What isan abstract class and when do you use it?
What is a map? What are the implementations of map?
How do you add an element to an arraylist in java?
What does replaceall do in java?
What is nested loop? What is dangling else condition in it?
Which class contains a method: cloneable or object?
What is port number in java?
What is style and indentation?
What is the escape character in java?
What is a qualifier in a sentence?