string - reading unicode input from user in java -
i have simple console program in java, try input user input in hebrew "שלום" when tried read ???? , wish "שלום" , how best way?
my code:
public static void main(string[] args) { string s; scanner in = new scanner(system.in); system.out.println("enter string"); s = in.nextline(); system.out.println(s); }
}
output:
run:
enter string
שלום
????
build successful (total time: 5 seconds)
i know should use utf-8 dont know how... help?
Comments
Post a Comment