Suppose I have a vector my_vector, where I have 1 element of type Point
Vector my_vector = new Vector();
my_vector.addElement(Point(0, 0, 0))
And I have 1 variable of type Point
Point cur_point = new Point(0, 0, 0)
And I want to assign this variable to the first element of "my_vector". When I write
cur_point = my_vector.elementAt(0)
I have an error:
Incompatible types:
Required: ClassName.Point
Found: java.lang.Object
What should I do to have a vector of Point and have a possibility to take some element from it?