Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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