< prev index next >

src/java.base/share/classes/java/lang/Enum.java

Print this page

        

@@ -45,10 +45,17 @@
  * More information about enums, including descriptions of the
  * implicitly declared methods synthesized by the compiler, can be
  * found in section 8.9 of
  * <cite>The Java&trade; Language Specification</cite>.
  *
+ * Enumeration types are all serializable and receive special handling
+ * by the serialization mechanism. The serialized representation used
+ * for enum constants cannot be customized. Declarations of methods
+ * and fields that would otherwise interact with serialization are
+ * ignored, including {@code serialVersionUID}; see the <cite>Java
+ * Object Serialization Specification</cite> for details.
+ *
  * <p> Note that when using an enumeration type as the type of a set
  * or as the type of the keys in a map, specialized and efficient
  * {@linkplain java.util.EnumSet set} and {@linkplain
  * java.util.EnumMap map} implementations are available.
  *
< prev index next >