public static boolean readBoolean(){
  String s=readString();
  if (s.equalsIgnoreCase("true"))   return true;
  if (s.equalsIgnoreCase("false"))   return false;
  if (s.equals("1"))   return true;
  if (s.equals("0"))   return false;
  throw new InputMismatchException();
}

public static boolean readBoolean ( ) { String s = readString ( ) ; if ( s . equalsIgnoreCase ( "true" ) ) return true ; if ( s . equalsIgnoreCase ( "false" ) ) return false ; if ( s . equals ( "1" ) ) return true ; if ( s . equals ( "0" ) ) return false ; throw new InputMismatchException ( ) ; }
reads the next token from standard input , parses it as a boolean , and returns the boolean .
