Array required but object found?
807597May 6 2005 — edited May 6 2005Hi I'm try to print out an element of a multidimensional array which is also an array! I have Object array records[400] each element of this array is another object array containing 4 strings and a string array
I have no problem printing the four strings:
for(int y =0; y < 4; y++){
System.out.println(((Object[])Records[0])[y]);
}
However I cannot print the fifth element of the array which is the array. Here is my code:
for(int z = 0; z < Records[0][4].length; z++){
System.out.println(((Object[])Records[0])[4]);
}
I get an error saying array required but java.lang.object found!
Can someone please help I'm completely confused have been messing with it all day! Thanks