Java Collection Tutorial - Java Arrays.toString(long[] a)


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

public static String toString(long[] a)


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

/* www. j a v  a  2s  .c o  m*/

import java.util.Arrays;

public class Main {

   public static void main(String[] args) {

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


The code above generates the following result.