Hi, yeah this indicates an Objectarray.
Also I was wrong in the above post, you should get an ClassCastExecption if it is not an array. What I ment is that in the below example: "o = array;" would not raise an exception.
Code:
Object o = new Object();
Object[] array = new Object[0];
System.out.println(array.length);
System.out.println(o);
System.out.println(o.toString());
System.out.println(array);
produces this output.
Quote:
0
java.lang.Object@7cbde6
java.lang.Object@7cbde6
[Ljava.lang.Object;@1977b9b
as expected:
Quote:
The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
So it is quite likely that the objects in your for-clause are another type, which had overriden toString(), cause you don't get the above results.
So you should check this types.
E. G.:
Code:
for(int i=0; i<obj.length;i++){
System.out.println(obj[i].getClass().getName());
System.out.println("DATA>>"+ obj[i]);
}
Greetings Michael