• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

strictfp interfaces

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why can nested interfaces use the modifier "strictfp"?

Is there a logical explanation for this?
 
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you declare a top level class or top level interface strictfp, then all the methods declared in top level plus all nested classes and interfaces becomes strictfp.

Why can nested interfaces use the modifier "strictfp"?

Is there a logical explanation for this?



Suppose you have a method and a nested interface declared in a top level class and if you want strictfp behavior for all methods declared in nested interface only not for the instance methods of the top level class then you can easily do that without making top level class strictfp.

Naseem
reply
    Bookmark Topic Watch Topic
  • New Topic