compareTo() implementation problems
问题 Hi i'm having trouble implementing the compareTo method. I've looked for answers but nothing has been any help. I'm trying to fill a TreeSet with various sizes of circles. I need compareTo in my circle class to be able to store them this way. import java.util.*; import java.lang.*; abstract class Shape { private String name; //e.g."circlel", "rectangle3" Shape(String name0) { name = name0; } abstract double area (); // area of shape abstract double perim(); // length of perimeter of shape