grades[studentNum] = "A";
is the correct syntax for putting the string value of "A" into the array grades at location studentNum.
If this were the instantiation of the array grades
String [] grades = new String[4];
then when this loop is done,
| ARRAY grades: | A | A | A | A |
| INDICES | 0 | 1 | 2 | 3 |