educative.io

Educative

How have we ensured synchronization here?

ParkingLot::getNewParkingTicket is synchronized but we have single instance of ParkingLot
Each entrance should be able to call this method to make sure each entrance can generate tickets at the same time. So, should not this function be part of EntrancePanel ??