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


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

public static String toString(short[] a)


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

/*from   ww w  . j  a v a 2s  .  com*/

import java.util.Arrays;

public class Main {

   public static void main(String[] args) {

    short[] s1 = new short[] { 20, 70 };


The code above generates the following result.