// beep via the console
out.print ( "\007" );
out.flush();

// beep via toolkit
Toolkit.getDefaultToolkit().beep();