I need help properly assigning the values that I fetch from the text file into the array. And then loop through it. Here's my current code,
my problem is that the buffered reader fetches null values. And when I run the program , I get index out of bounds error and null pointer exception

public class Main {

public static String[] q=new String[50];
public static String[] a=new String[50];
public static String[] b=new String[50];
public static String[] c=new String[50];
public static String[] d=new String[50];
public static char[] ans=new char[50];
public static Scanner x=new Scanner(System.in);

public static int random(int min, int max){
int xx;
xx= (int) ( Math.random() * (max-min + 1))+ min;
return xx;
}
public static void main(String[] args) {





int ii=0;
int score=0;
try {
FileReader fr;
fr = new FileReader (new File("F:\\qa.txt"));
BufferedReader br = new BufferedReader (fr);

while (br.readLine()!= null) {
for(int ox=0;ox<5;ox++){

q[ox]= new String();
a[ox]= new String();
b[ox]= new String();
c[ox]= new String();
d[ox]= new String();



q[ox] = br.readLine();
a[ox]=br.readLine();
b[ox]=br.readLine();
c[ox]=br.readLine();
d[ox]=br.readLine();
String strtemp=br.readLine();
ans[ox]=strtemp.charAt(0);

}
}
br.close();

} catch (Exception e) { e.printStackTrace();}




for(int yy=0;yy<5;yy++){
int ran= random(1,4);
System.out.println(q[ran] + "\n" + a[ran] + "\n" + b[ran] + "\n" + c[ran] + "\n" + d[ran] + "\n" + "\n" + "Answer: ");
String strans=x.nextLine();
char y=strans.charAt(0);
if(y==ans[ran]){
System.out.println("Msg1!");
score++;
System.out.println("Score:" + score);
}else{
System.out.println("Msg2!");
}
}



}