26 Synchronization Why Synchronization public class Game {private int playerX;private int playerY;public boolean isAtExit() {return (playerX == 0 && playerY == 0);}public void setPosition(int x, int y) {playerX = x;playerY = y;Let's say you're creating a xxxx game. Any thread can set the position of the player, and any thread can check to see if the player is at the exit. For simplicity, let's say the exit is at positionx = 0, y = 0.