Code example for Scanner

Methods: nextLine

0
 * To change this template use File | Settings | File Templates. 
 */ 
public class InputCollector { 
    public String guess() {
        System.out.print("please guess: ");
        Scanner scanner = new Scanner(System.in);
        return scanner.nextLine();
    } 
}