static void displayData (String[] input) { int limit = 10; int[] word = new int[limit]; for (String a: input) { int b = a.length(); word[b]++; } for (int i = 0; i< limit;i++) System.out.println("There are "+ word[i] + " words with "+ i+ " characters"); }// end display data method
the error happens with this line
word[b]++;
any help is greatly appreciated
thanks
dale