Answers for "java 2d array print column"

3

print 2d array in java

int[][] array = new int[rows][columns];
System.out.println(Arrays.deepToString(array));
Posted by: Guest on October-24-2020
0

java print 2d array as table

static void debugV2(Object... obj) {
        System.out.println(Arrays.deepToString(obj)
                .replace("],", "\n").replace(",", "\t")
                .replaceAll("[\\[\\]]", " "));
    }

    static void debug(Object... obj) {
        System.err.println(Arrays.deepToString(obj).replace("], ", "]\n"));
    }
Posted by: Guest on December-12-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language