@Override public String toString(){
  StringBuilder result=new StringBuilder();
  result.append('[');
  for (int r=0; r < rows; r++) {
    if (r != 0) {
      result.append(", ");
    }
    result.append('[');
    for (int c=0; c < columns; c++) {
      if (c != 0) {
        result.append(", ");
      }
      result.append(data[r][c] & 0xFF);
    }
    result.append(']');
  }
  result.append(']');
  return result.toString();
}

@ Override public String toString ( ) { StringBuilder result = new StringBuilder ( ) ; result . append ( '[' ) ; for ( int r = 0 ; r < rows ; r ++ ) { if ( r != 0 ) { result . append ( ", " ) ; } result . append ( '[' ) ; for ( int c = 0 ; c < columns ; c ++ ) { if ( c != 0 ) { result . append ( ", " ) ; } result . append ( data [ r ] [ c ] & 0xFF ) ; } result . append ( ']' ) ; } result . append ( ']' ) ; return result . toString ( ) ; }
returns a human - readable string of the matrix contents . example : [ [ 1 , 2 ] , [ 3 , 4 ] ]
