diff --git "a/\346\226\271\346\263\225\345\244\215\344\271\2402/\350\256\270\345\237\271\346\250\237/Demo01.java" "b/\346\226\271\346\263\225\345\244\215\344\271\2402/\350\256\270\345\237\271\346\250\237/Demo01.java" new file mode 100644 index 0000000000000000000000000000000000000000..3e5b4e6c7c266c5589016a7164ae8e5a19ef278a --- /dev/null +++ "b/\346\226\271\346\263\225\345\244\215\344\271\2402/\350\256\270\345\237\271\346\250\237/Demo01.java" @@ -0,0 +1,38 @@ + +public class Demo01 { + public static void main(String[] args) { + int[] array = {19, 28, 37, 46, 50}; + + System.out.println("ÅÅÐò֮ǰ£º"); + printArray(array); + + System.out.println("ÅÅÐòÖ®ºó£º"); + printArray(sortArray(array)); + } + + public static int[] sortArray(int[] arr) { + int num ; + for (int i = 0; i < arr.length-1; i++) { + for (int j = 0; j < arr.length-1-i; j++) { + if(arr[j]