This is from JLS 3.10.6
(within an string literal..)
...It is a compile-time error if the character following a backslash in an escape is not
an ASCII b, t, n, f, r, ", ', \, 0, 1, 2, 3, 4, 5, 6, or 7. The Unicode escape \u is processed earlier
The following string is ok:
"\u005ctThis would be printed at a tab distance"
this string is equivalent to "\tThis would be..."
because \u005c has been translated to a backslash
However being \u0009 the Unicode for \t ,
"\u005cu0009Error"
will cause a compiler error, because \u005c has been translated to "\" and you cannot have "\u" within a string literal.