I can not solve the problem since I am a beginner. I would like to use UTF-8 encoding. If I type "aΓ‘kΓΊ" (or any text with non-English characters), the program will freeze!
Scanner sc = new Scanner(System.in);
System.out.println("Please type any text:");
String text = sc.nextLine();
System.out.println("");
System.out.println(text);
The InputSream class does some result, for example, System.in ...
user300895
source
share