How can i make this output easier?
<p>The problem i am having is i have to input 50 integers, and when i hit space it wont recongnize the number and when i hit enter then my output box is very very long for just 1 digit #'s</p>

<pre><code>static final int MAX = 50;
public static void main(String[] args)
{
    int index;
    int check;
    int infants = 0, children = 0, teens = 0, adults = 0;
    System.out.println("This program will count the number of people "
                        + "and how many of that age group cameto the college fair.");
    System.out.println("**********************************************************");
    System.out.println("Please enter the interger value data:");
    int [] peopleTypes = new int[MAX];

    Scanner keyboard = new Scanner(System.in);

    for(index=0; index&lt;MAX; index++)
        {
            peopleTypes[index] = keyboard.nextInt();
            if(peopleTypes[index] == 1)
                infants = infants + 1;
            if(peopleTypes[index] == 2)
                children = children + 1;
            if(peopleTypes[index] == 3)
                teens = teens + 1;
            if(peopleTypes[index] == 4)
                adults = adults + 1;
            else
                index = index-1;
            System.out.print("");
        }

    System.out.println("The number of infants that were at the college fair was: " + infants);
    System.out.println("The number of children that were at the college fair was: " + children);
    System.out.println("The number of teenagers that were at the college fair was: " + teens);
    System.out.println("The number of adults that were at the college fair was: " + adults);
</code></pre>
