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
Explain the difference between an object-oriented programming language and object-based programming language?
What does the ‘static’ keyword mean? Is it possible to override private or static method in java?
What is int short for?
What does compareto () do in java?
What is meant by method?
What are actual parameters?
Explain spliterator in java8?
Why do we use string?
Why runnable interface is used in java?
Why a dead thread occurs?
How do you stop a thread in java?
What's the default access specifier for variables and methods of a class?
What is externalizable interface?
What is difference between printf and scanf?
Explain listiterator and methods in listiterator?