Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package serialization;
- import java.io.*;
- public class SerializationReadSample {
- public static void main(String[]args) throws IOException, ClassNotFoundException{
- FileInputStream fs =new FileInputStream("student.ser");
- ObjectInputStream ois = new ObjectInputStream(fs);
- Student st = (Student)ois.readObject();
- System.out.println(st.id);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement