File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Wsad programming question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Wsad programming question" Watch "Wsad programming question" New topic

Wsad programming question

Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 629
Hi all,

Sometimes whenever I write any code in Wsad, I get this message at the side of my code.

The Serializable class xyz does not declare a static final serialversionUID field of type long
and gives me an option to add a default serial version id. now, when I click on the option, a new line is added to my code as follows:
private static final long serialVersionUID = 1L;

and I don't know what all this means. Anybody has any idea?


Be Humble... Be Nice.
Henry Wong

Joined: Sep 28, 2004
Posts: 20370

It is a class variable that is used to support versioning, when using serialization. To get full details on how it is used, take a peek at this article about serialization.


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 629
Thanks Henry I got it now.
I agree. Here's the link:
subject: Wsad programming question
It's not a secret anymore!