Java Arrays.toString(int[] a)
Syntax
Arrays.toString(int[] a) has the following syntax.
public static String toString(int[] a)
Example
In the following code shows how to use Arrays.toString(int[] a) method.
/*w w w . j ava2s .c o m*/
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
int[] i1 = new int[] { 3, 12, 98 };
System.out.println(Arrays.toString(i1));
}
}
The code above generates the following result.
Home »
Java Tutorial »
java.util »
Java Tutorial »
java.util »