@@ -0,0 +1,1486 @@
+import java.io.*;%0A%0A/**%0A * test serializable%0A */%0Apublic class TestSerializable %7B%0A    public static void main(String%5B%5D args) throws IOException, ClassNotFoundException %7B%0A        testWriteObject();%0A        testReadObject();%0A    %7D%0A%0A    static void testReadObject() throws IOException, ClassNotFoundException %7B%0A        FileInputStream stream = new FileInputStream(%22H:/object.txt%22);%0A        ObjectInputStream inputStream = new ObjectInputStream(stream);%0A        TestSerializable.User user = null;%0A%0A        user = (TestSerializable.User) inputStream.readObject();%0A        inputStream.close();%0A        stream.close();%0A        System.out.println(user);%0A    %7D%0A%0A    static void testWriteObject() throws IOException %7B%0A        FileOutputStream stream = new FileOutputStream(%22H:/object.txt%22);%0A        ObjectOutputStream outputStream = new ObjectOutputStream(stream);%0A        TestSerializable.User user = new TestSerializable.User(%22jack%22, 23);%0A%0A        outputStream.writeObject(user);%0A        outputStream.close();%0A        stream.close();%0A%0A        System.out.println(%22write object ok%22);%0A    %7D%0A%0A    static class User implements Serializable %7B%0A        String name;%0A        int age;%0A%0A        public User(String name, int age) %7B%0A            this.name = name;%0A            this.age = age;%0A        %7D%0A%0A        @Override%0A        public String toString() %7B%0A            return %22User%7B%22 +%0A                    %22name='%22 + name + '%5C'' +%0A                    %22, age=%22 + age +%0A                    '%7D';%0A        %7D%0A    %7D%0A%7D%0A

add serializable code