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[][] stringToBoolArray(String str) {
        String[] strArray = str.split(",");
        int size = strArray.length;
        boolean[][] result = new boolean[size][size];

        for (int i = 0; i < size; i++)
            for (int j = 0; j < size; j++)
                result[i][j] = strArray[i].charAt(j) == '1';

        return result;
    }
}