usa System.in.read() che ritorna un int che è il codice unicode e devi convertirlo in decimale con Integer.parseInt()