String[] result; declares a String array variable, but it doesn't create String array, so it's just a null pointer at this stage. When you try to use it you get as null pointer exception.
You must also create an empty String array to store values into with a
result = new String{size);
where size is how big you want the array to be.

Go at the line where the error tells you. You are using something there which is null. Something you haven't initialized. Also you cannot read a file if you don't know that it has enough lines in it.

String line = in.readLine();
while (line!=null) {
System.out.println("Line read: "+line);
// the last command of the while is:
line = in.readLine();
// you read the next line and go to the beginning of the while in order to check if it is null (no more lines to read)
}

Take the line and put it into your array. You need to check, the length of the array if it is enough to put elements inside. If the file has more lines than the length of the array

for(int i = 0;i<9;i++)// from 0 is your first line and 9 is the last line
{
id[i]=in.readLine();
result[i]=in.readLine();
}
for(int i = 0;i<10;i++)// from 0 is your first line and 9 is the last line
{
System.out.println(id);
System.out.println(result);
}

That is completely wrong. Don't give advices if you don't know what you are talking about. All you did is repeat the poster's code. If you say that the 10 needs to be 9 (which is wrong), then why didn't you do the same at the second loop?