Produce three beeps with a 500 milliseconds interval between two beeps in Java

java.awt.Toolkit.getDefaultToolkit().beep();
try {
    Thread.currentThread().sleep(500);
} catch (Exception e) {
}
java.awt.Toolkit.getDefaultToolkit().beep();
try {
    Thread.currentThread().sleep(500);
} catch (Exception e) {
}
java.awt.Toolkit.getDefaultToolkit().beep();

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.