/*排序*/int [] nums={44,22,33,55,99};int tp;for(int i=0;i<nums.length;i++){int index =i;int keyval=nums[i];for(int j=i;j<nums.length;j++){int ns =nums[j];if(keyval>ns){index=j;keyval=nums[j];}}tp=nums[i];nums[i]=nums[index];nums[index]=tp;}///java中的foreachfor(int nv:nums){System.out.println(n Read More