-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScript.java
More file actions
30 lines (30 loc) · 903 Bytes
/
Script.java
File metadata and controls
30 lines (30 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import java.io.*;
import java.util.*;
public class Script
{
public static void main(String[] args) throws FileNotFoundException, IOException, ClassNotFoundException
{
// ObjectOutputStream out = null;
// try
// {
// out = new ObjectOutputStream(new FileOutputStream("highScore.t1xt"));
// Integer score = 0;
// out.writeObject(score);
// out = new ObjectOutputStream(new FileOutputStream("totalScore.t1xt"));
// out.writeObject(score);
// }
// finally
// {
// out.close();
// }
ObjectInputStream in = null;
try{
in = new ObjectInputStream(new FileInputStream("highScore.t1xt"));
Integer a = (Integer)in.readObject();
System.out.println(a);
}
finally{
in.close();
}
}
}