有 3 种方法可以实现, 1、Collections.sort 排序重写 compare方法 2、实现Comparable接口 3、通过自定义比较器类的方式实现排序
Powered by: 博客园 Copyright © 2024 sealong Powered by .NET 8.0 on Kubernetes