I have a problem of initializing List in constructor.
I am trying to assign parameters to variable "tr" and tr.getVertices() is a List.
SimpleTriangle tr = new SimpleTriangle(tr.getVertices(), tr.getColour(), tr.getThickness(), ShapeType.TRIANGLE);
trList.add(tr);
It higlights tr.getVertices() and says "Variable tr might not been initialized"
Where SimpleTriangle is a child class.
public SimpleTriangle(List<Point> vertices, Color colour, int thickness, ShapeType shapeType) {
super(vertices, colour, thickness, shapeType); }
and parent class has method
public List<Point> getVertices() {
return vertices;
}