how to scan a character in java

Java
char tempPref = get.next().charAt(0);
Source

Also in Java: