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 array passed by reference in java?
Explain java coding standards for methods?
What is function overriding and overloading in java?
Describe the process as to how substring() methodology mechanisms in java.
What will happen to the exception object after exception handling?
What is the purpose of the file class in java programming?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread
When should you use arraylist and when should you use linkedlist?
Why Set interface contains unique elements, what internally implemented for this so that it contains unique elements?
What is a text string?
What is difference between public static and void?
How many types of literals are there in JAVA?
Is string a class in java?
How is final different from finally and finalize?
What are the problems faced by java programmers who don't use layout managers?