Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8182081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:44:11+00:00 2026-06-07T00:44:11+00:00

When implementing Serializable interface, in Java, we need to set it’s serialVersionUID long. Is

  • 0

When implementing Serializable interface, in Java, we need to set it’s serialVersionUID long.

Is there any differences whether default or auto generated long should be chosen?

When should one be preferred over another?

If auto generated long is chosen, should it be changed in event class if changed? In other words the value that gets assigned to serialVersionUID .. is it related to current structure of the class and fields and methods that are declared there?

private static final long   serialVersionUID    = 1L;
private static final long   serialVersionUID    = 6749067740891125834L;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T00:44:12+00:00Added an answer on June 7, 2026 at 12:44 am

    The serial version UID can be any number, its value has no specific meaning.

    It makes sense and is convenient to start it with 1 and increment it every time the format changes.

    You can only do that, however, if you thought about it from the beginning. If you already have existing data that you need to continue to be able to read, this data will have the auto-generated id. In this case, you have no choice, but to match that value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am implementing more classes which extend the Serializable interface. I understood it is
As we know Serializable is a Marker Interface(ie Interface without any methods). So i
What's the difference between using the Serializable attribute and implementing the ISerializable interface?
We don't need it if we're implementing Serializable. So why this difference? How does
When implementing the ISerializable interface in C#, we provide a constructor which takes a
I have a class Image implementing ISerializable : [Serializable] [XmlRoot(ElementName = IMAGE)] [TypeConverter(typeof(ImageTypeConverter))] public
Implementing a custom membership provider, there are certain properties such as MinRequiredPasswordLength that only
I am having a really strange problem implementing Java REST service. I am trying
When there is nothing to implement in the marker interfaces like Serializable What is
I want to write my own marker interfaces like java.io.Serializable or Cloneable which can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.