Deep to string

static String deepToString(Object[] a)
Returns a string representation of the "deep contents" of the specified array.

import java.util.Arrays;

public class Main {
  public static void main(String args[]) {
    String s[] = {"a", "b", "c", "d"};
    double d [][]= {
        {0.50, 0.20,  0.20, 0.30},
        {0.50, 1.10,  0.50, 0.80},
        {0.50, 0.70,  0.40},
        {0.50, 0.70},
        {0.50},
    };
    System.out.println(Arrays.toString(s));
    System.out.println(Arrays.deepToString(d));
  }
}

The output:


[a, b, c, d]
[[0.5, 0.2, 0.2, 0.3], [0.5, 1.1, 0.5, 0.8], [0.5, 0.7, 0.4], [0.5, 0.7], [0.5]]
Home 
  Java Book 
    Collection  

Arrays:
  1. Arrays
  2. Convert array to list
  3. Binary search an Array
  4. Deep to string
  5. Compare two arrays
  6. Fill value to array
  7. Sort an array
  8. Convert array to string