public static void main(String[] args){
		Scanner reader = new Scanner(System.in);
		char loop = 'y';
		while (loop == 'y'){//While loop allows program to be re-used



		Scanner scan = new Scanner(System.in);
		Random rand = new Random();
		int size = 0;

		boolean bError = true;

		System.out.println("------------RADIX SORT------------");
		System.out.print("Please enter the size of the array: ");
		
		while(bError){//While loop gets proper array size from user
			if(scan.hasNextInt()){
				size = scan.nextInt();
				if(size <= 9){
					System.out.print("Please enter new array size greater than 9: ");
					continue;
				}
			}
			else{
				scan.next();
				continue;
			}
			bError = false;
		}

		int[] randomArr = new int[size];

		for(int i=0; i<size; i++){//Fills array of given size with positive values
			int randInt = rand.nextInt(Integer.MAX_VALUE) + 1;
			randomArr[i] = randInt % (1000000);
		}

		radSort(randomArr, size);
		print(randomArr, size);

		System.out.print("Do you wish to run the program again?(y or n): ");
		loop = reader.next().trim().charAt(0);
		}
		reader.close();
	}