aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Wsad programming question" Watch "Wsad programming question" New topic
Author

Wsad programming question

Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 627
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?

Thanks.


Be Humble... Be Nice.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18896
    
  40

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.

http://java.sun.com/developer/technicalArticles/Programming/serialization/

Henry


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

Joined: Nov 10, 2007
Posts: 627
Thanks Henry I got it now.
 
 
subject: Wsad programming question