Solved PassingCars in java