This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma 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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "strictfp" Watch "strictfp" New topic


agrah upadhyay
Ranch Hand

Joined: Sep 01, 2005
Posts: 579
Can anyone please explore some points and facts about strict needed for SCJP1.4
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Please have a look at this

Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
sampath garapati
Ranch Hand

Joined: Sep 26, 2005
Posts: 39
strictfp is a keyword.
You can modify a class declaration using the keyword final, abstract,
or strictfp.
You�re free to use strictfp in combination with abstract or final.

Marking a class as strictfp means that any method code in the class will conform to the IEEE754 standard rules for floating points. Without that
modifier, floating points used in the methods might behave in a platform-dependent way. If you don�t declare a class as strictfp, you can still get strictfp behavior on a method-by-method basis, by declaring a method as strictfp.

Abstract methods also cannot be marked as strictfp.

Remember, strictfp forces floating points (and any floating-point operations) to adhere to the IEE754 standard. With strictfp, you can predict how your floating points will behave regardless of the underlying
platform the JVM is running on. The downside is that if the underlying platform is capable of supporting greater precision, a strictfp method won�t be able to take advantage of it.

Instance variables cannot be marked strictfp.
agrah upadhyay
Ranch Hand

Joined: Sep 01, 2005
Posts: 579
Thanx Sampath And Raghvan for claring my doubt.
I think it is necessary to only this much.Right?If so then
Thanx u very much again
[ September 29, 2005: Message edited by: agrah upadhyay ]
I agree. Here's the link:
subject: strictfp
It's not a secret anymore!