是否在java中为无穷大定义了常量 [英] Is there any constant defined for infinity in java
本文介绍了是否在java中为无穷大定义了常量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在编写一个包含变量INFINITY的类。在java中是否有为此定义的常量,以便我可以分配该值?
在.NET中,有无限的System.Threading.Timeout.Infinite。我也在寻找相同的java。
I am writing a class which contain a variable INFINITY. Is there any constant defined for this in java so that i can assign that value?
In .NET, there is System.Threading.Timeout.Infinite for infinity. I am looking for the same in java also.
推荐答案
不知道,急于知道是否有任何!!!
No idea , eager to know if there is any!!!
你需要什么无限?
对于数字包装器类型。
例如Double.POSITVE_INFINITY
For the numeric wrapper types.
e.g Double.POSITVE_INFINITY
这篇关于是否在java中为无穷大定义了常量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文