個人資源與分享網站:http://xiaocaoshare.com/
public static void main( String[] args )
{
System.out.println( "Hello World!" );
List<String[]> list=new ArrayList<String[]>();
String[] str1= {"僑香公寓;7棟;13;1310", "HB170700068", "方園", "18565730881", "申海平", "18676362390", "租客需求"};
String[] str2= {"僑香公寓;7棟;13;1310", "HB170700068", "方園", "18565730881", "申海平", "18676362390", "租客需求"};
list.add(str1);
list.add(str2);
list.stream()
.collect(
Collectors.collectingAndThen(
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(x -> x[0] + x[1]+x[2]+x[3]+x[4]+x[5]+x[6]))),
ArrayList::new
)
);
list.stream().forEach(System.out::println);
}