1
JavaIntermediate#serialization
The process of converting an object's state into a byte stream so it can be persisted to disk or sent over a network, and later reconstructed (deserialization). A class must implement Serializable to support it.
class User implements Serializable {
String name;
}
try (ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream("user.ser"))) {
out.writeObject(new User());
}