标签: java collections
我有这行代码:
SortedSet<Person> personenArray = new TreeSet<> (Comparator.comparingInt(Person::getWeight()));
我有一个班级Person,其中包含getWeight()方法,但它告诉我Person cannot be resolved to a variable并且找不到方法getHeight()。
Person
getWeight()
Person cannot be resolved to a variable
getHeight()
我做错了什么?