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 is independent and dependent variables in research?
What is polymorphism in java? What are the kinds of polymorphism?
How java uses the string and stringbuffer classes?
Can each java object keep track of all the threads that want to exclusively access it?
Is java owned by oracle?
What is the use of jtable?
What is methods and methodology?
What is increment in java?
What are the main concepts of oops in java?
What is the purpose of assert keyword used in jdk1.4.x?
What is the use of flag?
What is the collections api?
What is comparable and comparator interface? List their differences
What are the advantages of exception handling?
Can size_t be negative?