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
What are void methods?
Describe the syntax of multiple inheritance? When do we use such an inheritance?
Why runnable interface is used in java?
What class of exceptions are generated by the java run-time system?
What does this () mean in constructor chaining concept?
How to reverse string in java?
what do you mean by classloader?
Where local and global variables are stored?
Which way a developer should use for creating thread, i.e. Sub classing thread or implementing runnable.
What are the types of strings?
What is the difference between JVM and JRE?
What programs use java?
What is fundamental datatype?
What is the difference between the boolean & operator and the && operator in java programming?
Can we extend private class in java?