java集合中的反转排序怎么用的
展开全部
方法一:实现拍行Comparable接口芹携排序package collsort.comparable;
package com.cvicse.sort.comparable;
public class Cat implements Comparable<Cat>嫌贺伏 {
private int age;
private String name;
public Cat(int age, String name) {
this.age = age;
this.name = name;
}
public int getAge() {
return age;
package com.cvicse.sort.comparable;
public class Cat implements Comparable<Cat>嫌贺伏 {
private int age;
private String name;
public Cat(int age, String name) {
this.age = age;
this.name = name;
}
public int getAge() {
return age;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询