sample project help

Design and implement an application that reads an arbitrary number of intergers that are in the range 0-50 inclusive and counts how many occurreces of each are entered. After all input has been processed , print all values(with the number of occurences ) that were entered one or more times..

Java Code:

import java.util.Scanner;
public class SevenPtOne {
public static void main(String[] args){
int x;
Scanner readMe = new Scanner(System.in);
System.out.println("Enter couple numbers from 0-50");
readMe.nextInt();
for (int i = 0; i <args.length;i++) {
x = Integer.parseInt(args[i]);
// not really sure if i understand the question all the way but heres what i have so far
// i know i need another for loop but not sure what im checking for..help plz
}
}
}

I'm not really sure you should be looking to use a for loop, but rather a while loop since there is an indefinite number of values coming in. You should also define an exit condition(Maybe if the inputted number is out of the accepted range), to exit the while loop.