java - How to specify an item in an object array within an object array? -
i have object array named objects i've used loop create 5 new object arrays within it. print contents this:
system.out.println(arrays.tostring((object[]) objects[1])); returns: [1, 1, 3]
these contents of second array, return 3, how so?
try this:
object[] temparr = (object[]) objects[1]; system.out.println(temparr[temparr.length - 1]);
hope helps...
Comments
Post a Comment