69c40cca62b10212e0a70e7f22f9fd4ef0a8dc76.svn-base 549 B

1234567891011121314151617181920
  1. package org.jeecg.modules.demo.untils;
  2. public class text {
  3. public static void main(String[] args) {
  4. int[] Arr = {34, 53, 12, 32, 56, 17};
  5. for (int i = 0; i < Arr.length - 1; i++) {
  6. for (int j = 0; j <Arr.length-1-i ; j++) {
  7. if(Arr[j]>Arr[j+1]){
  8. int tem=Arr[j];
  9. Arr[j]=Arr[j+1];
  10. Arr[j+1]=tem;
  11. }
  12. }
  13. }
  14. for (int i = 0; i <Arr.length ; i++) {
  15. System.out.println(Arr[i]);
  16. }
  17. }
  18. }