-1L serialization java code example Example 1: import java.io.serializable import java.io.Serializable; Example 2: when to use serializable in java serialize(empObj);