Before the Java character escapes this piece to understand, here to reason oneself subjective superficial understanding
Here talk about character encoding is another problem and escaping no relationship
Do the following code analysis
System.out.println ("a". Length () + "B". Length ());
For the above code ["a". Length () + "B". Length ()] section
["] defaults to the compiler's ["], which identifies the string part of the compiler, ["a". Length () + "B". Length ()] After execution the output string is [2]
System.out.println ("A\". Length () +\ "B". Length ());
For the above code [a\]. Length () +\ "B" section
["] escapes as a string ["], which is used to identify the "string" part of a string (if the string can be executed like the code in the compiler, the effect would be similar), [a\. Length () +\ "b] executes after the string is [a]. Length () +" B ", The string output after the overall execution is [14]
Coding is another problem, is the machine recognition of characters, is the concrete manifestation of all abstract
ASCII encoding, Unicode encoding, and its implementation are UTF-8 encoded to implement characters in different binary ways, but in any case, all of these encodings are the same as the 0--127 notation (ASCII character implementations are common in all encodings)
Here is how Ruan greatly explained the problem of coding
Http://www.ruanyifeng.com/blog/2007/10/ascii_unicode_and_utf-8.html
Java character escapes