22. Scalaã®ã¡ãªãã 1. å°ãªãã³ã¼ãéã§çç£æ§åä¸ nï® ä¾ Javaã®ä¾ List<User> list = new ArrayList<User>(); list.add(user01); .... Collections.sort(list, new Comparator<User>(){ @Override public int compare(User o1, User o2){ return 01.id - o2.id; } }); Scalaã®ä¾ val list = List(.... User ....) list sort (_.id < _.id)
{{#tags}}- {{label}}
{{/tags}}