Sorry, but what's being asked doesn't really fit the definition of a histogram as far as I know. It's a nice little twist to a problem that normally involves a histogram though, and one that's arguably simpler.
A few things:
1. Scanner has a nextInt() method you can use to avoid jumping through Integer parsing hoops. For some reason, you jumped through that hoop on line 24 to get the value for numStudents. On line 30, you didn't. Be consistent and prefer the simpler way; don't jump through hoops if you don't need to.
2. You declared the variables A, B, C, D, F but it doesn't look like you ever use them.
3. Indentation is important because it gives you visual clues about the flow of logic. Lines 35-55 should be less indented and lined up with the lines 28, 32, and 33. If you're using an
IDE, figure out what the shortcut keys are for autoformatting your code, then use it. In Eclipse, it's Alt+Shift+F. If you're not using an IDE, there are online code beautifiers available (for example,
https://www.tutorialspoint.com/online_java_formatter.htm)
Think about your logic a little bit. The program asks the user to enter a letter grade. Then, you're
supposed to count how many students got that particular letter grade. If you look at the first thing you do in each of those if-statements you have stacked up on top of each other, you're actually clobbering the letter that the user entered. That is, if the user says they want to count how many students got an A, then when you enter the number grades, you enter a 70, the first thing you do is clobber the 'A' in the variable
letter (the value that the user entered) by changing it to a 'C'. That's not right.
Talk yourself through the manual process first. How would *you* solve this problem if you only had pen and paper? Once you can describe the process as you would do it, it's easier to tell the computer how to do it.