This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 17.3, “How to use @SerialVersionUID and other Scala annotations.”
You want to specify that a class is serializable, and set the
serialVersionUID. More generally, you want to know the syntax for using annotations in your Scala code, and know which annotations are available.
Use the Scala
@SerialVersionUID annotation while also having your class extend the