This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Compiler Warning when you implement Serializable interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Compiler Warning when you implement Serializable interface" Watch "Compiler Warning when you implement Serializable interface" New topic
Author

Compiler Warning when you implement Serializable interface

Harikrishna Gorrepati
Ranch Hand

Joined: Sep 23, 2010
Posts: 422
Hi, why do I get compiler warning when I implement Serializable interface "The serializable class <OUR_CLASS_NAME> does not declare a static final serialVersionUID field of type long"..Please advice what is the meaning of this?


OCPJP 6.0-81% | Preparing for OCWCD
http://www.certpal.com/blogs/cert-articles | http://sites.google.com/site/mostlyjava/scwcd |
Chad Michaels
Ranch Hand

Joined: Jun 25, 2010
Posts: 42
Can you give a code example?
Harikrishna Gorrepati
Ranch Hand

Joined: Sep 23, 2010
Posts: 422
Chad Michaels wrote:Can you give a code example?
Sure chad. Here you go.
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Harikrishna Gorrepati wrote:
Chad Michaels wrote:Can you give a code example?
Sure chad. Here you go.
Compiler warning : The serializable class P626_Generics_classType4_Ask does not declare a static final serialVersionUID field of type long


Have you read the API for the Serializable interface? I think that this issue is well discussed there.

Luck!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Compiler Warning when you implement Serializable interface
 
Similar Threads
is Serialization Inherited
Serialization
Serialization via Inheritance
Serializable interface
serialVersionUID in java