Here you can find the source of loadBooleanArray(BufferedReader in)
public static boolean[] loadBooleanArray(BufferedReader in)
//package com.java2s; //License from project: Open Source License import java.io.BufferedReader; import java.io.IOException; import java.util.Scanner; public class Main { public static boolean[] loadBooleanArray(BufferedReader in) { try {/*from ww w.java2 s. c om*/ int dim = Integer.parseInt(in.readLine()); String[] vals = in.readLine().split("\\s+"); boolean[] ret = new boolean[dim]; for (int i = 0; i < ret.length; i++) { ret[i] = Boolean.parseBoolean(vals[i]); } return ret; } catch (IOException e) { throw new RuntimeException(e); } } public static boolean[] loadBooleanArray(Scanner reader) { int dim = reader.nextInt(); boolean[] ret = new boolean[dim]; for (int i = 0; i < dim; i++) { ret[i] = Boolean.parseBoolean(reader.next()); } return ret; } }