Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about serialization  RSS feed

 
Thanuja Vishwanath
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Serializable interface has no methods. If so how does serialization happens? does JVM takes care of it?
 
Joe Ess
Bartender
Posts: 9428
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Serializable is what is called a Marker Interface. It indicates that we agree that we will abide by the rules of serialization even though the interface doesn't specify any methods.
If you are interested in the actual mechanism of serialization, the Java API documentation and this article do a good job of explaining it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!