This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes private static final long serialVersionUID = 1L; -  Don't exist unique at a class that extends... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "private static final long serialVersionUID = 1L; -  Don Watch "private static final long serialVersionUID = 1L; -  Don New topic
Author

private static final long serialVersionUID = 1L; - Don't exist unique at a class that extends...

André Asantos
Ranch Hand

Joined: Nov 23, 2009
Posts: 234



Don't exist unique at a class that extends the Serializeble Interface?

Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 44538
    
  34
I don't understand the question. Sorry.
Tanathip Viriya
Greenhorn

Joined: Mar 17, 2010
Posts: 5
I don't understand question too but from

private static final long serialVersionUID = 1L;


this is a default value of serialVersionUID.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 44538
    
  34
Welcome to the Ranch
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20131
    
  30

Tanathip Viriya wrote:I don't understand question too but from

private static final long serialVersionUID = 1L;


this is a default value of serialVersionUID.

Actually, the default value is calculated automatically. Just try it - create a class without a serialVersionUID field, then run the "serialver" tool with the class name (e.g. serialver Test).

Most IDE's choose to add 1L as the default value but I prefer to let my Eclipse generate it (most likely using serialver).


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Tanathip Viriya
Greenhorn

Joined: Mar 17, 2010
Posts: 5
Rob Prime wrote:
Tanathip Viriya wrote:I don't understand question too but from

private static final long serialVersionUID = 1L;


this is a default value of serialVersionUID.

Actually, the default value is calculated automatically. Just try it - create a class without a serialVersionUID field, then run the "serialver" tool with the class name (e.g. serialver Test).

Most IDE's choose to add 1L as the default value but I prefer to let my Eclipse generate it (most likely using serialver).


Thank you for clarification.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: private static final long serialVersionUID = 1L; - Don't exist unique at a class that extends...
 
It's not a secret anymore!