I\'m a bit new to java, When I assign a unicode string to
String str = \"\\u0142o\\u017Cy\\u0142\";
System.out.println(str);
final StringBuilder stri
Java interprets unicode escapes such as your \u0142
that are in the source code as if you had actually typed that character (latin small letter L with stroke) into the source.
Java does not interpret unicode escapes that it reads from a file.
If you take your String str = "\u0142o\u017Cy\u0142";
and write it to a file a.txt
from your Java program, then open the file in an editor, you'll see the characters themselves in the file, not the \uNNNN sequence.
If you then take your original posted program and read that a.txt
file you should see what you expected.