• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

another concept

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can an instance method be overriden to be final or synchronized or strictfp or native, which all regarded as kind of implementation property?
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
reply
    Bookmark Topic Watch Topic
  • New Topic