I am tring to read a file which has lines like so:
438782 Abaca bunchy top virus NC_010314 Musa Sp.
So the lines contain information seperated by tabs. I am tring to read this file and do something with every line after splitting them. It keeps throwing a NullPointerException
error though. This always happens on the line where I try to split. In the code below I left everything unrelated to this issue out.
BufferedReader br = new BufferedReader(new FileReader(filename));
String nextLine = br.readLine();
String[] line;
while (nextLine != null) {
nextLine = br.readLine();
line = nextLine.split("\t"); //Error line
//Do something with line
}