As part of debugging an application, I noticed that Field.getDeclaredFields()
returns some synthetic fields, including a serialVersionUID
field in a class extending an interface, although none extend Serializable
.
Why does the compiler add such fields?
UPDATE
In fact, there is also a $VRc
synthetic field created.