Why POJO class implements Serializable Interface ?
Hi,
I saw some websites in that have used pojo class
but they have implemented the serializable interface.
for eg .
public class UsersPojo implements Serializable
{
//.... getter setter methods..
}
My question is why serializable is used in that case.
Thanks in Advance
Noorul
Re: Why POJO class implements Serializable Interface ?
Its a way to tell the jvm that the class can be serialized using methods like writeObject().
Read the API doc for the Serializable class and the class with the writeObject() method for more info.