Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
I respectfully disagree. The subclass calls the superclass' constructor, not an "inherited" one. Only class members are inherited, and the JLS specifically excludes constructors from this classification (� 8.8: Constructor declarations are not members. They are never inherited and therefore are not subject to hiding or overriding.).1. A subclass does inherit its base class' constructors. Otherwise, the subclass could not invoke the base class' constructor from its own constructors.
(I have not read the previous post because it is not written in english)
Originally posted by Vijay Gade:
You were saying something about the previous post not being written in English. Was that my post?
Anbudan & Mahalo,<br />Arul<br /> <br />-Not a sun certified Java professional :-)
SCWCD: Online Course, 50,000+ words and 200+ questions
http://www.examulator.com/moodle/course/view.php?id=5&topic=all
Originally posted by Vijay Gade:
Hello Barry,
You were saying something about the previous post not being written in English. Was that my post? Pardon my ignorance but I am just curious. Maybe it is not at all related to my post
Thanks,
-Vijay
Hi,
It's somehow related to inheritance. First of all you think when will (?) you use final modifier in class / method / variables (instance / local).
class - when class should not be subclassed
Method - when method should not be overridden
variable - when its value should not be modified
Now coming to constructors we can say it is a special kind of method in a class.
No way constructors(of any class) are going to be inherited by its subclass irrespective of its access modifier. So you can't override something which can't be inherited.So why do you want use final modifier with constructors?.
Something which doesn't give meaning can't / shouldn't be used..right?!!
That must be the reason Sun would have prevented using final modifier with constructors.
Hope you got my point!!!
Regards,
Priya.
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Marcus:
please do not use contractions such as wanna,gonna etc, clarity is very important. Many people in these forums have English has a second language and such contractions can confuse.
Barry:
What I am reacting to is the (increasing) usage of "text speak". I just turn away from it now. Spell the words out as in an English dictionary.
Anbudan & Mahalo,<br />Arul<br /> <br />-Not a sun certified Java professional :-)
Originally posted by Lokanadham Nalla:
why can't constructors be final as we can not [override] constructors.
Originally posted by Arulkumar Gopalan:
I understand/agree that it is recommended to use proper English in technical forums. But, I don't think Priya's communication was bad in such a way none could understand.
Perhaps you could have communicated directly to use proper text English instead of saying "it is not written in English".
(As Steve did.)
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Originally posted by Joyce Lee:
So, are abbreviations like "IMHO", "AFAIK", "BTW", "ASAP"... etc acceptable here?
Vincent Brabant<br /><a href="http://fr.netbeans.org" target="_blank" rel="nofollow">http://fr.netbeans.org</a>
Originally posted by Joyce Lee:
So, are abbreviations like "IMHO", "AFAIK", "BTW", "ASAP"... etc acceptable here?
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Originally posted by Lokanadham Nalla:
Hi there,
why can't constructors be final as we can not inherite constructors.
Loka
SCWCD 1.4(In progress)<br />SCJP 5.0<br />IBM Certified Solutions Expert for Webshpere Studio, V3.5 (retired)
This tiny ad is wafer thin:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|