Pregunta de entrevista de Mastercard

What is the difference between the sleep and wait method in java?