How does Java process the backspace terminal control character? Last Updated : 26 Oct, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report What is the backspace terminal control character? In this article, we will discuss about the backspace terminal control character. It is used to move the cursor one character back. For backspace terminal control we use '\b' notation in Java. What does the backspace terminal control character do? By using backspace terminal control we remove the character which is before the '\b' notation in a string. But there is only one condition: When we put the '\b' notation in the string, we have to take care if there is something after the '\b' notation. If this condition is not satisfied it runs with the same string which is provided in the input without any change. How does Java process the backspace terminal control character? Java doesn't handle that '\b' character at all. All it knows about is a byte stream onto which the operating system says it can write bytes and it will do so including an ASCII backspace. when the stream/string receives that character, has nothing whatsoever to do with Java. It is totally terminal dependent. Some terminals will erase the previous character, some will display the backspace character as some weird symbol. For better understanding follow below simple code example: Java // Java code to explain the use of '\b' import java.io.*; class GFG { public static void main(String[] args) { // Declare the backspace terminal notation char bc = '\b'; System.out.print("Hellooo" + bc + "GeeksFor\bGeeks"); } } OutputHelloooGeeksForGeeks Conclusion: See here the terminal is showing some weird symbol instead of erasing the previous character. So, we can conclude that though this backspace control is useful for some cases when we want to erase a particular character in the stream/ string, the only flaw is that Java does not handle it and due to this reason some compilers or interpreters show weird symbols. Comment More infoAdvertise with us Next Article CharacterIterator next() method in Java with Examples M m0hitkirange Follow Improve Article Tags : Java Technical Scripter 2022 Practice Tags : Java Similar Reads Character.reverseBytes() in Java with examples The Character.reverseBytes() method in Java is a utility function from the java.lang.Character class. This method is used to reverse the order of the two bytes in a given 16-bit Unicode character (char). All Java characters are two bytes. It is useful when we work with systems or protocols that use 2 min read CharacterIterator previous() method in Java with Examples The previous() method of java.text.CharacterIterator interface in Java is used to get the previous character that is to be read by this CharacterIterator. This method decrements this iterator to one index backwards and returns that previous character. Syntax: public char previous() Parameter: This m 1 min read CharacterIterator last() method in Java with Examples The last() method of java.text.CharacterIterator interface in Java is used to get the character at the ending of this CharacterIterator. This method sets the position of the iterator to the last character, using getEndIndex(), and then returns that character. Syntax: public char last() Parameter: Th 1 min read CharacterIterator next() method in Java with Examples The next() method of java.text.CharacterIterator interface in Java is used to get the next character that is to be read by this CharacterIterator. This method decrements this iterator to one index forward and returns that next character. Syntax: public char next() Parameter: This method do not accep 1 min read Character.isISOControl() method with examples in Java The java.lang.Character.isISOControl() is an inbuilt method in java which determines if the specified character is an ISO control character or not. A character is considered to be an ISO control character if its code is in the range â\u0000â through â\u001Fâ or in the range â\u007Fâ through â\u009Fâ 3 min read StringBuilder deleteCharAt() in Java with Examples The deleteCharAt(int index) method of StringBuilder class remove the character at the given index from String contained by StringBuilder. This method takes index as a parameter which represents the index of char we want to remove and returns the remaining String as StringBuilder Object. This StringB 3 min read Like