Java AtomicInteger toString() 方法

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

Java AtomicInteger 类的 toString() 方法返回当前值的字符串表示。

语法

返回

此方法返回当前值的字符串表示。

示例 1

输出

the  new value is:1

示例 2

输出

the  new value is: 100

示例 3

输出

the  new value is: 34

示例 4

输出

the  new value is: -10

示例 5

输出

the  new value is: 0
 
下一主题Java AtomicInteger