Win a copy of Head First Android this week in the Android forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

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