-3

i am new in java,i got a problom.

how do i close this warning in java

it says "The serialiszable class hrd1 dose not declare a static final serialVersionUID field of type long"

1 Answers1

1

You can add a variable to your class like this:

private static final long serialVersionUID = 1L;

Or add a supresswarnings annotation to your class

@SuppressWarnings("serial")
public SomeClass {
Jorge Campos
  • 22,647
  • 7
  • 56
  • 87