dcsimg
 

Submitted by: M S Sridhar(sridhar.ms@gmail.com)

Tuesday Feb 13th 2018 by M S Sridhar

Language: Java, Expertise: Intermediate - Learn to use java.awt.Toolkit.getDefaultToolkit.beep(); to get the attention of a user.

Getting the attention of a user is easily achieved in Java with the following code.

Listing 1.

public class Beep
{
   public static void main(String args[])
   {
      Beep beep = new Beep();
      beep.proceed();
   }
   
   private void proceed()
   {
      java.awt.Toolkit.getDefaultToolkit().beep();
   }

}
Home
Mobile Site | Full Site
Copyright 2018 © QuinStreet Inc. All Rights Reserved