Java Strictfp Keyword

Java Strictfp Keyword

Java strictfp keyword ensures that you will get the same result on every platform if you perform operations in the floating-point variable. The precision may differ from platform to platform that is why java programming language have provided the strictfp keyword, so that you get same result on every platform. So, now you have better control over the floating-point arithmetic.


Legal code for strictfp keyword

The strictfp keyword can be applied on methods, classes and interfaces.



Illegal code for strictfp keyword

The strictfp keyword cannot be applied on abstract methods, variables or constructors.

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/java/263810.html

(0)
上一篇 2022年6月1日 15:04
下一篇 2022年6月1日 15:04

相关推荐

发表回复

登录后才能评论