This is my java implementation of traffic light problem