Do not assume char represents only one character:
"\uD83D\uDC31".length() == 2
The escape sequence represents the Unicode code point 0x1F431 in UTF-16 as 2 chars. So even though this is only a single cat face symbol on the screen, the length() method returns 2.