Ethon

为什么要有方法,因为懒惰是一种美德。

   :: 首页  :: 新随笔  ::  ::  :: 管理

2020年2月13日

摘要: Collections 中有一个方法叫做sort可以对集合中的内容进行排序,要使用这个sort方法进行排序的集合,里面的泛型必须实现Comparable接口,实现这个接口的对象才具备排序的功能,这种排序自然排序。 第一种:Comparable 排序接口,若一个类实现了Comparable接口,就意味 阅读全文
posted @ 2020-02-13 20:45 Ethon 阅读(308) 评论(0) 推荐(0) 编辑

摘要: List中字典指定元素排序 array = [{"score": "98", "name": "lili", "age": 19}, {"score": "98", "name": "chenming", "age": 18}, {"score": "88", "name": "wangxin", 阅读全文
posted @ 2020-02-13 16:37 Ethon 阅读(3065) 评论(0) 推荐(0) 编辑