Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- public class Main {
- public static void main(String[] args) {
- try(ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("person.dat")))
- {
- Employee e = null;
- oos.writeObject(e);
- }
- catch(Exception ex){
- System.out.println(ex.getMessage());
- }
- }
- public class Employee implements Serializable {
- public String name;
- public String address;
- public transient int SSN;
- public int number;
- public final int BIRTH_YEAR = 2000;
- public transient String password = "MyPassword2000";
- public String nickname;
- public static int dayOff;
- public void mailCheck() {
- System.out.println("Mailing a check to " + name + " " + address);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement