No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I Would like to create a High Score For a Game in jave Called Jetman. i have created a class in java called Score and Score list to display the score but i do not know how to create a highscore using an Array List the Score Class is package … |
|
package jetman; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.*; //import java.util.Arrays.sort(); public class scoreList { String filePath = "Score.txt"; private ArrayList<Score> scoreArrayList = new ArrayList<Score>(); /** Creates a new instance of scoreList */ public scoreList() { FileWriter writer = null; try { writer = new FileWriter("Scores.txt"); } catch (IOException … |