Write a Java program (non-GUI preferred) that has a method named atomic().
Demonstrate in the program how two threads can, sometimes, invoke atomic() concurrently.
Create a second version of the program in which the two threads cannot invoke atomic concurrently.
Submit both programs using the Assignment Files tab above.
To assist, I have included a demo file of a multi-thread program. Remember that the ideal program demonstrates threading in action.
The demo program file has been attached to this post. Please write only original functional Java code for this assignment and upload by the time due.