I'm trying to read a file which contains:
Dante
Beatrice
3
5
and put them into an array. Then I will assign the values of each member of the array to static variables. when i run the main class of my project, it throws a NullPointerException starting from the line in bold T_T i dunno what to do T_T
can anyone please please help me? i badly need this for my project T_T
public static void loadPositions(){
try{
BufferedReader loadPlayerPositions = new BufferedReader(new FileReader("/media/KEI-SAMA/CS11/JOKE CS11/KnowGoMilestone5/playerpositions.txt"));
String info[] = new String[3];
for (int l = 0; l < info.length; l++){
info[l] = loadPlayerPositions.readLine();
[B] info[0] = Players.nameOfPlayer1.toString();[/B]
info[1] = Players.nameOfPlayer2.toString();
info[2] = Players.loadplayer1currentblock;
info[3] = Players.loadplayer2currentblock;