Hi this is a portion ao the program i am writing i have problem storing the result both the Name of Player and Score in a text file. It should also update the result if a player with the same name plays again.
Basically it should be like this
and so on.
else if ( state == Answer4)
if (replyInput.equalsIgnoreCase ("2"))
QScore += 20;
SendToClient = Name+ "...Congratulations You have scored "+QScore+"%."+" You want to try again? (y/n)";
SendToTxtFile = Name+" scored "+QScore+" %";
a = new String(SendToTxtFile);
state = PlayAgain;