Forums Register Login

another concept

+Pie Number of slices to send: Send
Can an instance method be overriden to be final or synchronized or strictfp or native, which all regarded as kind of implementation property?
+Pie Number of slices to send: Send
Yes, a method can be overridden and you can add final, synchronized, native or strictfp.
Note it is not possible to create an abstract method that is final, synchronized, native or strictfp. This is fairly obvious as it would not make sense to do so.
+Pie Number of slices to send: Send
As far as I've seen in my studies, there's no
problem with overriding methods to be final or synchronized. I think native should be possible too.
strictfp is not a valid modifier as of JDK1.3, it's just a reserved keyword!
What you can't do is overriding a static method to be non-static and vice versa (Compiler error).
Forget Steve. Look at this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 567 times.
Similar Threads
Abstract methods
An abstract method can NOT be declared static, synchronized,
Page 129 - K&B 1.4 - Abstract Methods
abstract and strictfp
abstract strictfp class legal?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 05:22:03.