Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
extending class with serialVersionUID
jacob deiter
Ranch Hand
Posts: 594
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
class A{ static final long serialVersionUID = -90745766939L; } class B extends A{ static final long serialVersionUID = -97190745766939L; }
here ,if I use class B then its serialversionis used ,what will happen for class A serialversionId?
Paul Clapham
Marshal
Posts: 28193
95
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
It follows the same rule as for any other static variable.
Henry Wong
author
Posts: 23951
142
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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)
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
eclipse 3.1, java 5
private static final long serialVersionUID = 1L; - Don't exist unique at a class that extends...
ArrayList problem ...
About serialVersionUID
sending org.jdom.Document object over JMS
More...