冒泡排序

  1. for(int i =0;i < score.length - 1;i++)
  2.  
    {
  3.  
    for(int j = 0;j < score.length - 1-i;j++)// j开始等于0,
  4.  
    {
  5.  
    if(score[j] < score[j+1])
  6.  
    {
  7.  
    int temp = score[j];
  8.  
    score[j] = score[j+1];
  9.  
    score[j+1] = temp;
  10.  
    }
  11.  
    }
  12.  
    }
原文地址:https://www.cnblogs.com/taochengyong/p/9281560.html