Suppose a file named Exercise17_07.dat has been created using the ObjectOutputStream. The file contains Loan objects. The

Question:

Suppose a file named Exercise17_07.dat has been created using the ObjectOutputStream. The file contains Loan objects. The Loan class in Listing 10.2 does not implement Serializable. Rewrite the Loan class to implement Serializable. Write a program that reads the Loan objects from the file and displays the total loan amount. Suppose you don?t know how many Loan objects are there in the file, use EOFException to end the loop.

Listing

image

image

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: