class Solution {public List<List<Integer>> minimumAbsDifference(int[] arr) {//由小到大排序Arrays.sort(arr);int min = arr[1]-arr[0];//注意这个最小值的选取for (int i = 1; i < arr.length; i++) {if (min > arr[i] - arr[i - 1] ){min = arr[i] - arr[i - 1];}}List<List<Integer>> list = new ArrayList<>();//定义返回值中外层的List< List<Integer> >for (int i = 1; i < arr.length; i++) {List<Integer> sublist = new ArrayList<>();//定义返回值中内嵌的List<Integer>if (arr[i] - arr[i - 1] == min){sublist.add(arr[i]);sublist.add(arr[i - 1]);Collections.sort(sublist);list.add(sublist);}}return list;}
}