Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Eclipse notification?

I just started using Eclipse (like, 10 minutes ago) and I figured out how to start a project. I copied and pasted my code (~400 lines long) and at my class declaration ( class Racing extends JFrame { ) it gives me this error:

The serializable class Racing does not declare a static final serialVersionUID field of type long

I don't know what this means, nor how to fix it. What I can get (I think this is something along the lines) is that I declared a long variable final (or maybe not - it's complaining about one of those). Is that what this means?

Update:

@theBig_a_27- alright, I thought I knew enough about Java that even if I found the most advanced answer, I would still be able to gather a general idea about the subject, but that is obviously not the case. That was complicated. Option #2 sounds like a better idea to me today.

2 Answers

Relevance
  • 9 years ago
    Favorite Answer

    option 1: learn what you are doing: http://www.javapractices.com/topic/TopicAction.do?...

    option 2: just skip over this without understanding and continue winging it:

    add:

    private static final long serialVersionUID = 1L;

    to the class Racing.

  • 9 years ago

    Usually those serializable errors are underlined in yellow, which means that you can ignore them. I'm not entirely sure what it means, but if you right click on the error eclipse usually gives you options to fix the error.

Still have questions? Get your answers by asking now.