COMP2396
Loading...
Searching...
No Matches
BoxTestDrive2.java
Go to the documentation of this file.
1import java.io.*;
2
3public class BoxTestDrive2 {
4 public static void main(String[] args) {
5 Box box = null;
6
7 try {
8 FileInputStream fs = new FileInputStream("Box.sav");
9 ObjectInputStream os = new ObjectInputStream(fs);
10 box = (Box) os.readObject();
11 os.close();
12 } catch (Exception ex) {
13 ex.printStackTrace();
14 }
15
16 System.out.println(box.getWidth());
17 System.out.println(box.getHeight());
18 }
19}
20
static void main(String[] args)