class Person2 extends java.lang.Object implements java.io.Externalizable
Modifier and Type | Field and Description |
---|---|
private int |
age |
private java.lang.String |
name |
private static long |
serialVersionUID |
Constructor and Description |
---|
Person2() |
Person2(java.lang.String name,
int age) |
Modifier and Type | Method and Description |
---|---|
int |
getAge() |
java.lang.String |
getName() |
void |
readExternal(java.io.ObjectInput in) |
java.lang.String |
toString() |
void |
writeExternal(java.io.ObjectOutput out) |
private static final long serialVersionUID
private java.lang.String name
private int age
public java.lang.String getName()
public int getAge()
public java.lang.String toString()
toString
in class java.lang.Object
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException