Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. try {
  2.                     FileOutputStream fileOut = new FileOutputStream("src/GameSession.ser");
  3.                     ObjectOutputStream out = new ObjectOutputStream(fileOut);
  4.                     out.writeObject(game);
  5.                     out.close();
  6.                     fileOut.close();
  7.                     lblStatus.setText("Game Session saved in src/GameSession.ser");
  8.                 }catch(IOException i) {
  9.                     lblStatus.setText("Couldn't save current game session!");
  10.                 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement