Question: I am getting `Object obj` from a method. `obj = String[7]`. I am having difficulty in getting these 7 Strings and print them.

How can I get Strings out of it?

Answer: 
If you're sure you have an array, you could use [`Arrays.toString()`](http://docs.oracle.com/javase/6/docs/api/java/util/Arrays.html#toString%28java.lang.Object%5B%5D%29):

```
System.out.println(Arrays.toString((Object[])obj));

```
If you have no idea whether an array is an Object array or primitive array (which means you can't cast it) You can use the Array class.

```
Object arr = new int[]{1, 2, 3};
for (int i = 0, len = Array.getLength(arr); i < len; i++)
    System.out.println(Array.get(arr, i));

```

If you know its a String[], make it that class.