So I'm sure this is an easy question to answer and I'm new to java but I want to pass an array into an argument and I'm having issues. Below I create 3 shapes and I'm trying to pass myShapes or that array into AreaCalculator
but I get the error -
cannot find symbol
symbol : method AreaCalculator()
location: class Points
AreaCalculator();
public static void main(String[] args)
{
Shape[] myShapes = new Shape[3];
AreaCalculator(myShapes);
}
class AreaCalculator{
public AreaCalculator(Shape[] shapes){
}
}
new. docs.oracle.com/javase/tutorial/java/javaOO/constructors.html