Hey
i want to create a vector in order to store circles in it.
i did something but im getting a warning error "java uses unchecked or unsafe operations"
if anyone knows whats going wrong let me know
thanks in advance!
import java.util.Vector;
import java.awt.*;
import java.awt.geom.*;
public class CircleList
{
Vector v = new Vector();
/**
* Constructor for objects of class CircleList
*/
private Circle circle1;
public void addToCircleList()
{
// initialise instance variables
v.add(circle1);
}
public void removeCircle()
{
v.remove(circle1);
}
}
class Circle
{
private int diameter;
private int xPosition;
private int yPosition;
private String color;
private boolean isVisible;
public Circle()
{
diameter = 30;
xPosition = 20;
yPosition = 60;
color = "blue";
isVisible = false;
}
public static void main(String[] args)
{
Circle x = new Circle();
System.out.println(x.toString());
}
}