Java??????:???????e??????????
???????????? ???????[ 2016/10/21 10:38:04 ] ?????????? e??????
????????????????м???????????????????????????????????Щ???????????????????????????ε???????ü???????????Σ???????У????????????????????????Щ??????????????????У???????????е???????????????????????μ?????????????????飬?ú??????????Щ?????????????????????????????????????????????????????????????????????????????java???????????C?????C++????????????????????????????????????e????????????????????
????e????????????????????д????????????????????????ɡ?
????package com.Arithmetic.chapter1;
????import java.util.Random;
????/**
????*
????* @????????Arithmetic
????* @???????Sort
????* @???????[czc]
????* @???????2016-10-20????06:30:55
????*/
????public class Sort {
????public static void main(String[] args) {
????Random random = new Random();
????int [] sort = new int[10];
????for (int i = 0; i < sort.length; i++) {
????sort[i] = random.nextInt(50);
????}
????System.out.println("??????????????");
????for(int i:sort){
????System.out.print(i+" ");
????}
????//bubbleSort(sort);
????selectSort(sort);
????System.out.println();
????System.out.println("?????????????");
????for (int i = 0; i < sort.length; i++) {
????System.out.print(sort[i]+" ");
????}
????}
????/**
????* e??????
????* ???α?????????????????С????????棬???????????
????* @param sort
????*/
????public static void bubbleSort(int [] sort){
????for(int i = 1;i<=sort.length;i++){
????for (int j = 0; j < sort.length-i; j++) {
????if (sort[j]>sort[j+1]) {
????int temp = sort[j+1];
????sort[j+1] = sort[j];
????sort[j] = temp;
????}
????}
????}
????}
????/**
????* ???????
????* ??????????????????????С????????????????????????е??????????????????????????.
????* @param sort
????*/
????public static void selectSort(int [] sort){
????for (int i = 0; i < sort.length-1; i++) {
????for (int j = i+1; j < sort.length; j++) {
????if (sort[j]<sort[i]) {
????int temp = sort[i];
????sort[i] = sort[j];
????sort[j] = temp;
????}
????}
????}
????}
????}
????????????Щ???????????????????в??????????????????????????????????????д????????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11