Java AtomicInteger floatValue() 方法

2025年3月20日 | 阅读时长1分钟

Java AtomicInteger 类的 floatValue() 方法通过扩展原始类型转换,将 AtomicInteger 的值返回为 float。

语法

返回

它返回给定 AtomicInteger 的 float 值。

示例 1

输出

the float value of integer: 0.0

示例 2

输出

the float value of integer: 10.0

示例 3

输出

the float value of integer: 100.0

示例 4

输出

the float value of integer: -10.0

示例 5

输出

the float value of integer: -4.0
 
下一主题Java AtomicInteger