Here you can find the source of getBoolean()
public static boolean getBoolean()
//package com.java2s; //License from project: Open Source License import java.util.Scanner; public class Main { private final static Scanner commandLine = new Scanner(System.in); public static boolean getBoolean() { char c = commandLine.nextLine().toLowerCase().trim().charAt(0); return 't' == c; }/*ww w .j a v a 2 s .c o m*/ }