我必须为名为compareTo()的对象编写自己的-Method代码,以便对对象进行词法排序,该顺序通过啤酒类型和啤酒名称对Beer进行比较。下面是我的compareTo方法:public int compareTo(Beer b) {
String compareBeer1 = this.getBeerType,我有一个Vector<Beer> filteredBeer,我还必须按词法排序。
错误: File "C:\Users\mike\Desktop\tutorial2.py", line 62, in <module>AttributeError: 'str' object has no attribute 'sort 我的代码: usernames = []usernames.append(我几天前才开始通过Introduction to <em