Mastercard interview question

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