![](/rp/kFAqShRrnkQMbH6NYLBYoJ3lq9s.png)
What is [Serializable] and when should I use it? - Stack Overflow
I found out that some classes use the [Serializable] attribute. What is it? When should I use it? What kinds of benefits will I get?
java - What does Serializable mean? - Stack Overflow
2010年8月7日 · Serializable is an interface called marker-interface just to tell Java I want to make serialization and de-serialization using this Java calss. Serialization: Write to the file or any other storage like a database. De-serialization: read from a file or any other storage like a database.
serialization - What is Serializable in Java? - Stack Overflow
serializable is a special interface that specifies that class is serialiazable. It's special in that unlike a normal interface it does not define any methods that must be implemented: it is simply marking the class as serializable. For more info see the Java docs. As to what "serializable" means it simply means converting an instance of a class (an object) into a format where it can be written ...
When should we implement Serializable interface?
Implement the Serializable interface when you want to be able to convert an instance of a class into a series of bytes or when you think that a Serializable object might reference an instance of your class. Serializable classes are useful when you want to persist instances of them or send them over a wire.
java - What is object serialization? - Stack Overflow
The object to be serialized must implement java.io.Serializable Interface. Default serialization mechanism for an object writes the class of the object, the class signature, and the values of all non-transient and non-static fields.
serialization - What is the difference between Serializable and ...
2009年5月3日 · The Serializable interface is defined to identify classes which implement the serializable protocol: package java.io; public interface Serializable {}; The serialization interface has no methods or fields and serves only to identify the semantics of being serializable.
Android: Difference between Parcelable and Serializable?
2010年7月23日 · Serializable is a standard Java interface. You simply mark a class Serializable by implementing the interface, and Java will automatically serialize it in certain situations. Parcelable is an Android specific interface where you implement the serialization yourself.
c# - What is the equivalent of [Serializable] in .NET Core ...
2016年8月29日 · In many cases, when I want to convert current .NET Framework projects to .NET Core equivalent, some classes have Serializable attribute. What should I do for convert them in .NET Core ? (In this t...
What is the point of the ISerializable interface? - Stack Overflow
2014年10月15日 · ISerializable is an interface, not an attribute. Is your question about the interface ISerializable, or the SerializableAttribute class?
java - Is custom enum Serializable too? - Stack Overflow
Documenting serializable fields and data for enum types is unnecessary, since there is no variation in the type of data sent. So, I don't think that the Enum is the right choice to test internal non-serializable classes work.