I believe this is due to improper input encoding processing.
If the input lines are specified in the source, you need to make sure that the source encoding matches the encoding in the compiler configuration. Note that Maven requires a separate compiler coding configuration as a property named project.build.sourceEncoding in pom.xml :
<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> ... </properties>
As a quick check, you can also replace characters in string literals with your Unicode ( \uxxxx ) screens - if the problem is caused by the source encoding, it should disappear.
If you are reading the input date from a file, make sure that you correctly specify the file encoding in your code and that you are not using methods based on the default system encoding.
See also:
source share