aspose file tools*
The moose likes Beginning Java and the fly likes extending class with serialVersionUID Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "extending class with serialVersionUID " Watch "extending class with serialVersionUID " New topic
Author

extending class with serialVersionUID

jacob deiter
Ranch Hand

Joined: Apr 02, 2008
Posts: 576

here ,if I use class B then its serialversionis used ,what will happen for class A serialversionId?

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18121
    
    8

It follows the same rule as for any other static variable.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18108
    
  39


Side issue: In this example, neither class is serializable, so the serial version uid won't be used -- at least, not by the Java serialization mechanism.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: extending class with serialVersionUID
 
Similar Threads
sending org.jdom.Document object over JMS
private static final long serialVersionUID = 1L; - Don't exist unique at a class that extends...
About serialVersionUID
ArrayList problem ...
eclipse 3.1, java 5