Java Strictfp Keyword
When operations on the floating-point variable are performed in Java, the precision may differ from one platform to another platform. To overcome this problem,Java programming language provide Strictfp Keyword which when used with class,method or interface ensures same result on any platform thereby providing better control over floating-point arithmetic.But this keyword cannot be used with constructor,abstract methods and variables.
Synatx Example:
strictfp class A{}//strictfp applied on class
strictfp interface M{}//strictfp applied on interface
class A
{
strictfp void m(){}//strictfp applied on method
}
0 Comment(s)