The method is invoked by the JVM. JVM can access your private methods. But other classes would not be able to access the same. Serializable is a marker interface having no methods. There are many methods you can have in your class which implements serializable to tell the JVM what to do at runtime with the method. A look at the api would be good. Here you go.