Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

strictfp

 
Danny Duong
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this part of the 1.4 exam?
I keep on seeing strictfp popping up on Mock Exams.
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All you need to know about strictfp is that its a keyword.
 
Salim Mohamed
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • 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.
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
I havent seen this explanation in any book. Thanks again Jessica !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic