I want to serialize a Java class because a warning: The serializable class GuiLote does not declare a static final serialVersionUID field of type long
.
Eclipse recommends this two options:
Add default serial version ID and Add generated serial version ID. What the difference between them?
Eclipse add this for default serial version ID:
/**
*
*/
private static final long serialVersionUID = 1L;
Or add this for generated serial version ID:
/**
*
*/
private static final long serialVersionUID = 8534363180966005148L;
This is my code:
public class GuiLote extends JInternalFrame implements ActionListener { ... }