Java Programming/Keywords/strictfp

From Wikibooks, open books for an open world
< Java Programming‎ | Keywords
Jump to: navigation, search

strictfp is a java keyword, since Java 1.2 .

It makes sure that floating point calculations result precisely the same regardless of the underlying operating system and hardware platform, even if more precision could be obtained. This is compatible with the earlier version of Java 1.1 . If you need that use it.

Syntax for classes:

public strictfp class MyClass 
{ 
  //...
}

Syntax for methods:

public strictfp void method() 
{ 
  ...
}

See also: