All pastes #977970 Raw Edit

Stuff

public text v1 · immutable
·published 2008-04-09 05:58 UTC
rendered paste body
/*Erik Dunn
  Programming Languages 
  4-4-08
  */


import java.util.Random;
import java.util.*;


public class selectionsort { 
     public static void main(String[] args){
		int i;
		//declare array
		int[] array;
		array = new int[10];

		Random r = new Random();
		/*int randint = r.nextInt(1024);
		System.out.println(randint);*/


		//populate the array
		System.out.println("Array is unsorted order");
		for(i=0;i<10;i++){
			int randint = r.nextInt(1024);
			//System.out.println(randint);
			array[i] = randint;
			System.out.println(array[i]);
			
		}
		/*Get Input from the user for random method*/
		/*int input = Interger.parseIn(args[0]);
		/*Compute the sort*/
		Arrays.sort(array);
		System.out.println("New Sorted Array");
		for(i=0;i<10;i++){
			System.out.println(array[i]);
		}
	} 
}