import java.util.Arrays;//必须加载 class Demo{ public static void main(String []args){ int[] arr={3,54,456,342,2798,15,78,56,95,5678,9,5}; System.out.println(Arrays.toString(arr));//java打印数组,排序前[3, 54, 456, 342, 2798, 15, 78, 56, 95, 5678, 9, 5] bubbleAr…