Java 3
Java 3
WORKSHEET 3
Aim: Define a person class that implements serializable the person classs has a
name, age and contacts attributes.{In a main create a person objecr. Cast the object
back to person. Finally, Print the deserialized person’s information. Remember to
handle exceptions in code.
1. Source Code:
import java.io.*;
import java.util.Scanner;
2. Screenshot of Outputs:
3. Learning Outcomes
i) Learnt about scanner class.
ii) Learnt about how to handle exception.
iii) Learnt about desearialization.