COMP2396
Loading...
Searching...
No Matches
BoxTestDrive.java
Go to the documentation of this file.
1
import
java.io.*;
2
3
public
class
BoxTestDrive
{
4
public
static
void
main
(String[] args) {
5
Box box =
new
Box();
6
box.setWidth(70);
7
box.setHeight(30);
8
9
try
{
10
FileOutputStream fs =
new
FileOutputStream(
"Box.sav"
);
11
ObjectOutputStream os =
new
ObjectOutputStream(fs);
12
os.writeObject(box);
13
os.close();
14
}
catch
(Exception ex) {
15
ex.printStackTrace();
16
}
17
}
18
}
BoxTestDrive
Definition
BoxTestDrive.java:3
BoxTestDrive.main
static void main(String[] args)
Definition
BoxTestDrive.java:4
chapter10
BoxTestDrive.java
Generated on Sat Dec 7 2024 17:10:09 for COMP2396 by
1.12.0