class Test
{
public static void main(String[] arg2)
{
// \u00A0 is a new line
char alpha = 'a';
System.out.println("abc" + alpha);
}
}
But it works.Why?
1 answers
solution1
4 ACCPTED 2016-09-14 14:25:44
The code works because the character \ is a non-breaking space and not a newline character.
Most likely what has happened is that the author has made a typo and actually meant to type \ , which is a line feed character and does indeed break as expected.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.