Unicode escapes are pre-processed before the compiler is run. Therefore, if you put u000A
in a String literal like this:
String someString = "foou000Abar";
It will be compiled exactly as if you wrote:
String someString = "foo
bar";
Stick to
(carriage return; 0x0D
) and
(line feed; 0x0A
)
Bonus: You can always have fun with this, especially given the limitations on most syntax highlighters. Next time you've got a sec, try running this code:
public class FalseIsTrue {
public static void main(String[] args) {
if ( false == true ) { //these characters are magic: u000au007du007b
System.out.println("false is true!");
}
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…