Check out example codes for "nextchar in java". It will help you in understanding the concepts better.

Code Example 1

Scanner scanner = new Scanner(System.in);
char ch = scanner.next().charAt(0);

Code Example 2

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

Learn ReactJs, React Native from akashmittal.com