student grade array problem

Hi again everyone. I am trying to change around this program I wrote to meet some new requirements, but getting stuck on how to do it.

*Write a program that reads a file consisting of students' test scores in the range of 0-200. The students scores should be stored into an array. It should then determine the number of students having sores in each of the following ranges: 0-24, 25-49, 50-74, 75-99, 100-124, 125-149, 150-174, and 175-200.

The first line in the input file will contain the number of students in the class.*

This is what I have to do... the program I had original would read in all the scores in the text file and output them to the console just fine, but my original array was dealing with the ranges of scores. I now need to change that so the student scores are used for the array, and the first number in the file is to show how many students in the class. I was trying to just edit my old program thinking it would be simple but I cant seem to get it to compile or run after all sorts of different tweaks. Any help appreciated.

In line 16 you are creating an array int[] gradeArray = new int[sgrades]; when you didn't initialize sgrades - you need to retrieve the number of students in the class, which is the first line in the file.

In the loop in line 21 you are ignoring the fact that the first line is different than the rest of the lines, and treat it as a regular line that holds a student's score.

You have to read the first line, determine the number of students, initialize the array, and only then retrieve the scores.
Also - please explain what you are trying to do in line 28 and beyond.

here is the error message:
Exception in thread "main" java.lang.NullPointerException
at DriverClass.DriverExam.questionsMissed(DriverExam.java:48)
at Chapter7ALabDemo.main(Chapter7ALabDemo.java:33)
program is to read a answer key txt and a student's …

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...