'Concat two strings to form an escape character in Java
I'm trying to read a file character by character and get escape characters interpreted as a single character (\b = '\b' instead of '\' + 'b').
I've performed the following experiment:
System.out.println("\\" + 'b');
System.out.println("" + '\\' + 'b');
System.out.println('\b');
System.out.println("\b");
gives me
\b
\b
Any clues? Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
