• 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

strictfp

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this part of the 1.4 exam?
I keep on seeing strictfp popping up on Mock Exams.
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All you need to know about strictfp is that its a keyword.
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jessica,
I have seen some of the mock exams whether it could be used as a modifier in a method , class etc. Can you tell us where it could be used and where it can't and shouldn't ?
Thanks in advance.
 
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From JLS 8.1.1.3


The effect of the strictfp modifier is to make all float or double expressions within the class declaration be explicitly FP-strict (�15.4). This implies that all methods declared in the class, and all nested types declared in the class, are implicitly strictfp.
Note also that all float or double expressions within all variable initializers, instance initializers, static initializers and constructors of the class will also be explicitly FP-strict.


And the rest is in JLS 15.4
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From Kathy Sierra and Bert Bates new book, Sun Certified Programmer & Developer for Java 2 Study Guide


...strictfp forces floating points (and any floating-point operations) to adhere to the IEEE745 standard. With strictfp, you can predict how yoru floating points will behave regardless of the underlying platform the JVM is running on...
For the exam, however, you don't need to know anything about strictfp other than what its used for, that it can modify a class or a nonabstract method declaration, and that a variable can never be declared strictfp.


[ December 18, 2002: Message edited by: Jessica Sant ]
 
Salim Mohamed
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I havent seen this explanation in any book. Thanks again Jessica !
 
reply
    Bookmark Topic Watch Topic
  • New Topic