---
title: "explain about strictfp keyword in Java ?"  
description: "explain about strictfp keyword in Java ?"  
author: "Anonymous User"  
published: 2015-07-09  
updated: 2020-09-18  
canonical: https://www.mindstick.com/interview/2692/explain-about-strictfp-keyword-in-java  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# explain about strictfp keyword in Java ?

If we want floating point values to be consistent across platforms, then we need to use "strictfp" as per IEEE 754 standard. When a program runs on multiple platforms, precision of floating point differ which in turn given different results. strictfp helps to enforce the precision across all platforms. For example:

```
Class Level - public strictfp class StrictFpModifierExample{}Method Level - public strictfp void example() {}
```

## Answers

### Answer by Anonymous User

If we want floating point values to be consistent across platforms, then we need to use "strictfp" as per IEEE 754 standard. When a program runs on multiple platforms, precision of floating point differ which in turn given different results. strictfp helps to enforce the precision across all platforms. For example:

```
Class Level - public strictfp class StrictFpModifierExample{}Method Level - public strictfp void example() {}
```


---

Original Source: https://www.mindstick.com/interview/2692/explain-about-strictfp-keyword-in-java

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
