I have an array of numbers and would like to retrieve one of the values from location "index". I've looked at the Java documentation http://java.sun.com/j2se/1.5.0/docs/api/java/lang/reflect/Array.html but my code still isn't compiling.
here is my method:
public class ConvexPolygon implements Shape
{
java.awt.Point[] vertices;
public ConvexPolygon(java.awt.Point[] vertices)
{
this.vertices = vertices;
this.color = color;
this.filled = filled;
}
java.awt.Point getVertex(int index)
{
Point vertex;
vertex = get(Point vertices, int index);
}
I have numbers in an array representing Points. The value index is going to be the location of the array verities. What can I do to make this work? Thanks !