对你来说很简单的问题,对我而言总是报告运行时错误(在线等)
public   class   NumSort   { 
 	public   static   void   main(String[]   args)   throws   Exception{ 
 			int[]   a   =   new   int[args.length]; 
 			for(int   i=0;i <args.length;i++){ 
 				a[i]=Integer.parseInt(args[i]); 
 			} 
 		print(a); 
 		//System.out.println(); 
 		selectionSort(a); 
 		print(a);    
 		}  	 
 	private   static   void   selectionSort(int[]   a)   {  		 
 		for(int   i   =   0;i <a.length;i++)   { 
 			for(int   j=   i+1;i <a.length;j++)   {  				 
 				if(a[i]> a[j])   { 
 					int   temp   =   a[i]; 
 					a[i]=a[j]; 
 					a[j]=temp; 
 				}			 
 			} 
 		}		 
 	}  		 
 	static   void   print(int[]   s)   { 
 		for(int   i=0;i <s.length;i++){ 
 			System.out.print(s[i]+ "    "); 
 		}	 
 		System.out.println(); 
 	}   
 }     
 以上的代码,编译通过,在运行时总是说arrayindexoutofboundsexception
------解决方案--------------------数组溢出
------解决方案--------------------直接放到一个List里面sort就行了,何必自己写呢。
------解决方案--------------------for(int i = 0;i <a.length;i++) { 
 			for(int j= i+1;i <a.length;j++) {  				 
 				if(a[i]> a[j]) { 
 					int temp = a[i]; 
 					a[i]=a[j]; 
 					a[j]=temp; 
 				}			 
 			} 
 		}	   
 第二个for循环多了
------解决方案--------------------for(int j= i+1;i <a.length;j++) { //是 j  < a.length,写错了
------解决方案--------------------当i=a.length-1时,j=i+1时,j的值超出数组上届
------解决方案--------------------for(int j= i+1;i <a.length;j++) {   应该是 for(int j= i+1;j <a.length;j++) {   
  不然是个死循环