Java tutorial
//package com.java2s; public class Main { public static boolean[] StringToBooleanArray(String bitPattern) { boolean[] array = new boolean[bitPattern.length()]; int index = 0; for (char c : bitPattern.toCharArray()) { if (c == '0') array[index] = false; else array[index] = true; index++; } return array; } }