Here you can find the source of nextChar(Scanner s)
read exactly one character from the scanner from: http://stackoverflow.com/a/13942707/1066911
public static char nextChar(Scanner s)
//package com.java2s; //License from project: Open Source License import java.util.Scanner; public class Main { /**//from w w w. ja v a 2 s .c o m * read exactly one character from the scanner * from: http://stackoverflow.com/a/13942707/1066911 */ public static char nextChar(Scanner s) { return s.findInLine(".").charAt(0); } }