Launch offer
Business website $150 USD Custom plugin $200 USD Ready in 5 days
Get a quote
Java

Serialization in Java

Convert objects to byte streams with Serializable (and know safer alternatives).

Java Tutorial Series (68/90). Prefer one article? Read the complete Java tutorial.

Short description

Java serialization is powerful but sensitive — for APIs prefer JSON. Use serialization carefully when required.

Serializable marker

import java.io.Serializable;

class User implements Serializable {
    private static final long serialVersionUID = 1L;
    String name;
}

Leave a reply

Your email address will not be published. Required fields are marked *