Back
Close

Computing with Data

elgeish
35.2K views

Java Object Serialization

Java's serialization framework provides a convenient mechanism to serialize arbitrary objects into a binary sequence:

import java.io.Serializable;
public class PatientInfo implements Serializable {
private static final long serialVersionUID = 42;
private final String name;
private final int age;
public PatientInfo(final String name, final int age) {
this.name = name;
this.age = age;
}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants