• Post Reply Bookmark Topic Watch Topic
  • New Topic

NotSerializableEzception  RSS feed

 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
When do I throw NotSerializableException ? When I do not want my class to be serialized ? Can some one give me a real life example.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you should normally never have to throw it yourself -- the JVM serialization machinery throws it if you try to serialize an object that doesn't implement the Serializable interface. You might want to catch it sometimes!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!