Forums Register Login

final class

+Pie Number of slices to send: Send
the following statement is true...but how?
can anyone explain please
all methods declared in a final class are implicitly final and hence cannot be
overridden.
+Pie Number of slices to send: Send
In order to override you would have to be writing a subclass - impossible with a class declared final.
+Pie Number of slices to send: Send
thanx william
+Pie Number of slices to send: Send
The final keyword ALWAYS makes things immutable once they have been declared and initialized. At least that is what I have read so far. Are there any exceptions?
[ January 09, 2002: Message edited by: Jason Kretzer ]
+Pie Number of slices to send: Send
There is a little trap for those programmers expecting that final static fields are unique in a class. If the same class is loaded several times by diferent class loaders in diferent name spaces, there would be several copies of those fields.
A bit off topic though. Just mentioned for you to consider in the future
[ January 09, 2002: Message edited by: Jose Botella ]
There is no greater crime than stealing somebody's best friend. I miss you tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 491 times.
Similar Threads
alternative for interface
StringBuffer Class
Stringbuffer vs. String
What to do ??
Abstract class VS final class?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 02:00:42.