javaarray.length the length of the array javaarray[index] read or write an array element
A read-only integer that specifies the number of elements in the Java array represented by the JavaArray object.
java.awt.Polygon is a JavaClass object. We can create a JavaObject representing an instance of the class like this:
p = new java.awt.Polygon();
for(int i = 0; i < p.xpoints.length; i++) p.xpoints[i] = Math.round(Math.random()*100); for(int i = 0; i < p.ypoints.length; i++) p.ypoints[i] = Math.round(Math.random()*100);