Jim,
Thanks for that lead. beep() is an abstract method of Toolkit. So creating an instance of Toolkit didn't work and I figured out how to get an instance of the Toolkit and then got my program to beep. The problem now is that after beeping, the program is stuck and doesn't return. I have to break it. Seems like it's waiting for some event. Keystroke doesn't help. What's Toolkit and how does it work?
import java.awt.*;
public class Beep
{
public static void main(
String args[])
{
Toolkit toolkit = Toolkit.getDefaultToolkit();
toolkit.beep();
}
}