标签:
---恢复内容开始---
public class Home {
public static void main (String[]args){
int [] Arrary = new String [3];
for(int i = 0;i<Arrary.length;i++){
String n1 = JOptionPane.showInputDialog(null,"请输入第:"+(i+1)+"个数");
int nn = Integer.parseInt(n1);
Arrary[i] = nn;
}
int mm = 0;
for(int i =0 ;i<Arrary.length;i++){
for(int j = i+1 ;j <Arrary.length;j++){
if(Arrary[i]>Arrary[j]){
mm = Arrary[i];
Arrary[i] = Arrary[j];
Arrary[j] = mm;
}
}
}
String aa = "";
for(int i = 0 ;i<Arrary.length;i++){
aa +=Arrary[i]+" ";
}
JOptionPane.showMessageDialog(null,aa);
}
}
---恢复内容结束---
标签:
原文地址:http://www.cnblogs.com/chenxiaoping/p/5324485.html