0

As the question says is there any advantages or disadvantages for this:

synchronized (monitor) {
    try {
        monitor.wait(1);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
}

Instead of using this:

Thread.sleep(1);
Dylan Wheeler
  • 6,928
  • 14
  • 56
  • 80
Dev_anon101
  • 107
  • 2
  • 11

0 Answers0