Java Arrays.toString(long[] a)

Syntax

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

public static String toString(long[] a)

Example

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


//from   w ww.ja  va2s  . c om

import java.util.Arrays;

public class Main {

   public static void main(String[] args) {

    long[] l1 = new long[] { 3, 12, 9 };

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

The code above generates the following result.