+ 10
You mean a char input? import java.io.IOException; ... try { char c = (char) System.in.read(); System.out.println(Integer.valueOf(c) + ": " + String.valueOf(c)); } catch (IOException ioe) { ioe.printStackTrace(); } Doesn't work at code playground.
2nd Apr 2017, 6:14 AM
Tashi N
Tashi N - avatar