I am wanting to save the highscore from my game to a database rather than a .dat file and was hoping if anyone could give me some help on how i could do it.
I have created the class for the database, im just not sure how i can implement the highscore to be saved in the database.
public class ScoreDB {
Connection conn = null;
String url = "jdbc:derby:ScoresDB;create=true";
String username = "hello";
String pass = "hello";
public void connectScoreDB(){
try{
conn= DriverManager.getConnection(url,username,pass);
}catch(SQLException ex){
System.err.println("SQLException: " + ex.getMessage());
}
}