Question d’entretien chez Ness Digital Engineering

basic java ques,puzzle one cabin 3 switch problem