Java AtomicInteger intValue() 方法

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

Java AtomicInteger 类的 intValue() 方法返回给定数字的整数值。

语法

返回

它将返回 AtomicInteger 值的整数表示。

示例 1

输出

the number is: 12

示例 2

输出

the number is: 0

示例 3

输出

the number is: 3

示例 4

输出

the number is: -10

示例 5

输出

the number is: -100
 
下一主题Java AtomicInteger