View Single Post
Object array length
Posts: n/a
Default Object array length - 04-20-2010, 09:55 AM

Is there a convenient way to get the length of an Object array? When I drag it over a number field, it just disappears.

I've found the following will work, but there's got to be an easier way:

1) Create another array (number/boolean/etc)
2) Drag that over a number field, choose size
3) Drag your object array over the array from #2
4) Delete the array from #1

Some of my students are working on writing methods that take Object arrays as a parameter and iterate through them, and I was hoping there'd be an easier way to have them find the array length than this.


fake edit: I know that lists are easier to use; the purpose of the exercise is to work with arrays.
Reply With Quote