System.out.println("Enter all of the exam scores.");
int NumberOfA = 0;
int NumberOfB = 0;
int NumberOfC = 0;
int NumberOfD = 0;
int NumberOfF = 0;
next = keyboard.nextInt();
score = keyboard.nextInt();
grade = keyboard.next();
Remove the curly braces which are indicated above and your problem will be solved.
these curly braces are making your veriables local so they are not accessible out side the curly braces.
for further support visithttp://www.braindumpindia.com