|
How to emit a beep by printing the ASCII Bell character to the console |
|
|
Bell character is the control code used to sound an audible bell or tone in
order to alert the user (ASCII 7, EBCDIC 2F). Bell character is an ASCII control character, code 7 (^G).
When it is sent to a printer or a terminal, nothing is printed, but an audible signal is emitted instead.
You can emit a beep by printing the ASCII Bell character ("\0007") to the console.
public class testBeep {
public static main(String args[]) {
// ASCII bell
System.out.print("\0007");
System.out.flush();
}
}
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.