Java Scanner Usage getBoolean()

Here you can find the source of getBoolean()

Description

get Boolean

License

Open Source License

Declaration

public static boolean getBoolean() 

Method Source Code

//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*/
}

Related

  1. createKeyboardScanner()
  2. createScannerForString(String s)
  3. enterToContinue()
  4. equalsToIgnoreEndline(String expected, String actual)
  5. fromStringToQuery(String value)
  6. getChar()
  7. getConstantPoolsFromText(String text)
  8. getDirectoryString()
  9. getEndLine(String cqlString)