I want to make a high score saver in java with a text file, the file is called highscore. I wondered how to save an int if that int is larger than the one that is already in the file. Could someone please help?
if(highscore.txt.getText().toInt() < score) { delete(highscore.txt, inJar()); writeWithText(highscores.txt, score.toString(), inJar()); }
delete(highscore.txt, inJar()); writeWithText(highscores.txt, score.toString(), inJar());
delete(highscore.txt, inJar()); writeWithText(highscores.txt, score.toString(), inJar());