Java Shape Quiz
Can anyone elaborate on the following line of code from the "Java Shapes Project" (in More On Classes): Square a = new Square(x); Circle b = new Circle(y); Specifically, I'm not understanding the "Square a" and "Circle b" parts??? Is it just assigning "Square(int x)" to "a" ? So when it's called later in "a.area()". If so, couldn't someone write "Circle a = new Circle(x);" How would it know if "a.area()" was for the Circle or Square???