This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes strictfp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "strictfp" Watch "strictfp" New topic
Author

strictfp

Danny Duong
Greenhorn

Joined: Dec 12, 2002
Posts: 14
Is this part of the 1.4 exam?
I keep on seeing strictfp popping up on Mock Exams.
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

All you need to know about strictfp is that its a keyword.
Salim Mohamed
Ranch Hand

Joined: Sep 19, 2002
Posts: 55
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

Joined: Jul 03, 2001
Posts: 2120
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


SCJP2. Please Indent your code using UBB Code
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

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

Joined: Sep 19, 2002
Posts: 55
I havent seen this explanation in any book. Thanks again Jessica !
 
GeeCON Prague 2014
 
subject: strictfp