特牛网址导航

自定义排序-CSDN博客

网友收藏
文章浏览阅读44次。object Text01 { def main(args: Array[String]): Unit = { val ls=List(new User(1,"WNN",10),new User(2,"CC",11),new User(3,"DD",19)) implicit def opt(user: User): Ordered[User] ={ new Ordered[User] { override def compare(that: User): I
标签:自定义排序