Java Arrays.toString(double[] a)

Syntax

Arrays.toString(double[] a) has the following syntax.

public static String toString(double[] a)

Example

In the following code shows how to use Arrays.toString(double[] a) method.


/*w ww. j a v a  2  s  .  c o m*/

import java.util.Arrays;

public class Main {

   public static void main(String[] args) {

    double[] d1 = new double[] { 1.9, 2.9, 3.4 };


    System.out.println(Arrays.toString(d1));    
  }
}

The code above generates the following result.