Add beep to your project

int tick = 10;
    for (int i = 0; i < tick; ++i) {
     println("Beep : " + i);
      // Ring the bell again using the Toolkit 
      java.awt.Toolkit.getDefaultToolkit().beep();
      try {
        Thread.sleep(1011); // introduce delay
      } catch (InterruptedException e) {
      }
    }

https://www.codercrunch.com/question/2123074635/how-generate-beep-java

2 Likes