Mastercard Interview Question

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