//The following program will generate 5 beeps per 2 second.
class testforbeep
{
public static void main(String args[])
{
int i;
for(i=1;i<=5;i++)
{
try{Thread.sleep(2000);}catch( InterruptedException ie){}
java.awt.Toolkit.getDefaultToo lkit().beep();
}
}
}
To generate beep from your computer speaker, write the following code.
java.awt.Toolkit.getDefaultToo lkit().beep();
class testforbeep
{
public static void main(String args[])
{
int i;
for(i=1;i<=5;i++)
{
try{Thread.sleep(2000);}catch(
java.awt.Toolkit.getDefaultToo
}
}
}
To generate beep from your computer speaker, write the following code.
java.awt.Toolkit.getDefaultToo
No comments:
Post a Comment