Basic array issue in Java
===

Looking for help with a basic array problem. Program has to read a sentence and store the frequencies of the word lengths in an array and then print out how many words are 1 letter words, 2 letter words etc.

I'm a pretty raw java programmer but have made a stab at it below would greatly appreciate some guidance. What I have seems to compile but spits out some garbled hex when I run the program and enter a sentence.

    class WordCount {
    	public static void main(String[] args) {
           int wordList[] = new int[20];
           System.out.println("Please enter a sentence.");

           for(int i = 0; i<=wordList.length; i++){

           String s = Console.readToken();
           int x = s.length();
           wordList[x]++; }

           i = 1;
	 
	    while (i<wordList.length) {
	
	        if (count[i]>0)  
		System.out.println(i + "-letter words: " + count[i]);
                i++;
	        }

          
             



    

