Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
Newbie - I don't understand interface Serializable
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Lasse Reichstein Nielsen, post: 3577810"] Correct. It's a "marker interface" which merely marks the class as being intended for serialization. The serialization code checks for the marker, and refuses to serialize something without it - not because it couldn't, but just because it won't - serializing and derserializing something not build for it could cause unexpected trouble. Today it would probably have been implemented as an inherited annotation. If it implements the Serializable interface. Yes, that class isn't serializable. No need to write the "extends Object". The class will automatically extend Object if no other superclass is given. That it implements the interface! That means that the default serialization code will accept to serialize and deserialize objects of that class. /L [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
Newbie - I don't understand interface Serializable
Top