Java Array to String toString(int X[][])

Here you can find the source of toString(int X[][])

Description

to String

License

Apache License

Declaration

public static String toString(int X[][]) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.Arrays;

public class Main {
    public static String toString(int X[][]) {
        StringBuffer res = new StringBuffer("{");
        for (int row[] : X) {
            if (row != X[0]) {
                res.append(", ");
            }/* w w  w.  ja  va  2  s  . c  om*/
            res.append(Arrays.toString(row));
        }
        res.append("}");
        return res.toString();
    }
}

Related

  1. toString(byte[] array)
  2. toString(Class aClass, Object[] objects)
  3. toString(Class[] modelPath)
  4. toString(final byte[] buffer, final int offset, final int length)
  5. toString(final Object[] array)
  6. toString(int[] a, int maxValues)
  7. toString(int[] codes)
  8. toString(int[] v, char delim)
  9. toString(long[] dom)