Print Backspace Escape Sequence
This program demonstrates the backspace escape sequence.
Problem Statement
Write a Java program that prints text using the backspace escape sequence.
Source Code
| 1 | public class BackspaceEscape { |
| 2 | public static void main(String[] args) { |
| 3 | System.out.println("Eduinq\bPrograms"); |
| 4 | } |
| 5 | } |
Program Output
EduinPrograms
Explanation
\b Removes the previous character. "Eduinq\bPrograms" Removes 'q' before printing Programs. Conclusion: Shows how backspace escape sequence modifies output.