April 2017
Intermediate to advanced
594 pages
25h 15m
English
In this example, you implemented two different tasks to work with an AtomicIntegerArray object:
In the Main class, you created AtomicIntegerArray with 1,000 elements, then you executed 100 incrementer and 100 decrementer tasks. At the end of these tasks, if there were no inconsistency errors, all the elements of the array must have the value 0. If you execute the program, you will see how the program only writes the final message to the console because all the elements are zero.
Read now
Unlock full access