标签:array i++ tran code void color static oid pre
public class TestRandom { public static void main(String[] args) { int a[]=new int[10]; int temp; for (int i = 0; i < a.length; i++) { a[i]=(int)(Math.random()*100); } for (int i = 0; i < 10; i++) { for (int j = i+1; j < 10; j++) { if (a[i]>a[j]) { temp=a[i]; a[i]=a[j]; a[j]=temp; } } } //for (int i = 0; i < 10; i++) { System.out.println(a[9]+" "); //} } /* Arrays.sort()???????*/ }
标签:array i++ tran code void color static oid pre
原文地址:http://www.cnblogs.com/lc-java/p/7359113.html