Arrays.toString is used to represent contents of an array as String. One has to import java.util.Arrays in order to call Arrays.toString.
Java Code:
String []array = new String[3];
array[0] = "Australia";
array[1] = "Denmark";
array[2] = "Itlay";

System.out.println(Arrays.toString(array));
Output:
Java Code:
[Australia, Denmark, Itlay]