Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Serialization

 
Doit
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think an object is serializable when it explicitly implement
Serializable interface. Are there any objects that are by default serializable.I mean implicitly implimenting Serializable interface?
- Thanks
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Object streams implement Serializable interface. There are a lot of other classes which implement sub-interfaces of serializable. Java API documentation is the best place to find what you are looking for.
Ajith
 
Doit
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ajith,
I found that Vector,String,Exception,all Wrapper classes,GridBagConstraint classes are serializable.
But are they serializable without explicitly implementing the
Serializable interface??
- Thanks
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope. They must implement the Serializable interface in order to become serializable.
Ajith
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic