0

I have a problem about not showing some characters in Java. I use Intellij to implement an example.

I have a team object shown below

public class Team {

    private String name;
    private int points;
    private int goalsScored;
    private int goalsAgainst;
    private int goalDifference;
}

I assigned some values through this code snippets shown below.

private static List getTeamStats() { List plTeams = new ArrayList<>();

    plTeams.add(new Team("Team ç", 33, 27, 12));
    plTeams.add(new Team("Team ü", 32, 40, 16));
    plTeams.add(new Team("Team ğ", 30, 24, 16));
    return plTeams;

}

When I try to interate each one through this code shown below

plTeams.forEach(System.out::println);

I get this result.

Team �  ...
Team �  ...
Team �  ...

I also tried to use Locale.setDefault(Locale.forLanguageTag("tr-TR")); but it didn't help me fix the issue.

I also tried this but nothing changed.

Help --> Edit Custom VM Options

-Duser.language=tr
-Duser.country=TR
-Duser.variant=TR

How can I fix it?

qwercan
  • 89
  • 7

0 Answers0