0

..this is a simple java code w/c allows to produce a beep sound.
timer also is being applied here.
hope it will help for any reason it may serve.
:-)

import java.awt.*;
import java.io.*;

public class timer_beep {

    public static void main(String args[])throws IOException
    {
            try{
                
                System.out.println("Countdown started!");
                    Thread.sleep(1000);
                for(int x=10;x>=0;x--)
                {
                        System.out.println(x);
                        Toolkit.getDefaultToolkit().beep();
                        Thread.sleep(600);
                }
                    Thread.sleep(2000);
                Toolkit.getDefaultToolkit().beep();
                    System.out.println("beep testing!");
               
            
            
        }
        catch(InterruptedException e) { }
             
    }
    
    
}
2
Contributors
1
Reply
3
Views
10 Years
Discussion Span
Last Post by toyi
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.