[Solved] How to save results from the game to text file [closed]
I’ve created a basic class for you that will save the wins to a text file and retrieve them from a text file. import java.io.File; import java.io.FileNotFoundException; import java.io.PrintWriter; import java.util.Scanner; public class WinsFileManager { String path = System.getProperty(“user.home”).replace(“\\”, “\\\\”) + “\\”; public int getWins(String fileName) { String fullPath = path + fileName; int wins … Read more