In my program I have a class called Circles and a class called CircleList which is a vector of Circles.
I can add and take away Circles to the list fine but when I try to use a circle from the list like so.
Circle test = CircleList.elementAt(0);
It fails as a Circle is expected but an object is found. Is there anyway I can fix this so it comes out of the vector back as a Circle rather than as an Object?
here is the start of the CircleList class with the constructor
import java.util.Vector;
public class CircleList
{
private Vector CircleList;
public CircleList()
{
CircleList = new Vector();
}