在groovy中對list排序是很簡單的事情。 ... list<<[name:"dd",age:2] def newlist=list.sort{a,b-> return a.age-b.age } newlist.each{ println it }.
確定! 回上一頁