File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes another concept Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "another concept" Watch "another concept" New topic
Author

another concept

Richard Wilson
Ranch Hand

Joined: Jan 12, 2002
Posts: 57
Can an instance method be overriden to be final or synchronized or strictfp or native, which all regarded as kind of implementation property?


Richard Wilson
Phil Sharp
Ranch Hand

Joined: Nov 08, 2001
Posts: 40
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.
Peter Bugla
Greenhorn

Joined: Feb 12, 2002
Posts: 22
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).


Peter Bugla<br />Sun Certified Programmer for Java 2 Platform
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: another concept