java print out elements in array code example Example: java print array System.out.println(Arrays.toString(arr));