devxlogo

What Does “strictfp” Do?”

What Does “strictfp” Do?”

When this modifier is specified, the JVM sticks to the Java specifications and returns the consistent value independent of the platform. That is, if you want the answers from your code (which uses floating point values) to be consistent in all platforms, then you need to specify the strictfp modifier.

Java’s default class Math uses this strictfp modifier as shown below

public final strictfp class Math{     }

devx-admin

Share the Post: