HW3 3. Java implementation

Scenario: Warring neighbors with Peterson's Algorithm.
Please check if it has any problems or mistakes