An Elegant Solution
int grade; // the grade being processed.
// For i in 0..100, freq[i] is # of grades of i.
int[] freq = new int[101];
/* �Process� grades until (but not including) a stopping signal of -1. */
/* Initialize 101 counters to 0. */
/* Increment counter for grade. */
freq[grade] = freq[grade] + 1;
System.out.println(�Grade Frequency�);