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?
![Twitter](/assets/twitter-4e19209ef84344ee0c433f4c7bad8d49.png)
![Twitter.hover](/assets/twitter.hover-1fb19a5bafc50deace8f88eaec867845.png)
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());