0

What is "Atomic integer" in java?

private static final AtomicInteger i = new AtomicInteger(1);

20th Jun 2018, 10:49 AM
Star Lord
Star Lord - avatar
1 ответ
+ 1
It allows you to use Atomic operations. If you have multi threading application than simple increment like i++ may end with wrong result. That's why it's better to use atomic operations.
20th Jun 2018, 11:29 AM
Lstiti
Актуальное сегодня
.
1 Votes
What?
0 Votes
HTML
0 Votes
Web
0 Votes
Quiz duel
0 Votes
FRC Coding?
1 Votes
help
0 Votes
AI
2 Votes
APIs
1 Votes