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

  • Home
  • SEARCH
  • 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 6662821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:25:54+00:00 2026-05-26T02:25:54+00:00

When I create Java Class in Eclipse which implements Serializable interface, I get a

  • 0

When I create Java Class in Eclipse which implements Serializable interface, I get a warning

The serializable class ABCD does not declare a static final
serialVersionUID field of type long

So when I click on warning, I get a option in Eclipse to

Add generated Serial Version ID

Once I choose that option, Eclipse automatically creates a serialVersionUID variable for me.

Now I wanted to know that on what basis that number is generated. It is a just any random number ? Can I provide any random number of my own ?

  • 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-05-26T02:25:54+00:00Added an answer on May 26, 2026 at 2:25 am

    It is calculated based on the structure of your class – fields, methods, etc. It is specified in the Object Serialization Specification – see this section for the exact format.

    The spec describes what happens in no value is provided, but the autogeneration uses the same algorithm.

    The sequence of items in the stream is as follows:

    • The class name.
    • The class modifiers written as a 32-bit integer.
    • The name of each interface sorted by name.
    • For each field of the class sorted by field name (except private static and private transient fields:
      • The name of the field.
      • The modifiers of the field written as a 32-bit integer.
      • The descriptor
        of the field.
    • If a class initializer exists, write out the following:
      • The name of the method, .
      • The modifier of the method, java.lang.reflect.Modifier.STATIC, written as a 32-bit integer.
      • The descriptor of the method, ()V.
    • For each non-private constructor sorted by method name and signature:
      • The name of the method, .
      • The modifiers of the method written as a 32-bit integer.
      • The descriptor of the method.
    • For each non-private method sorted by method name and signature:
      • The name of the method.
      • The modifiers of the method written as a 32-bit integer.
      • The descriptor of the method.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While you create a user defined class in Java, you do not specify it
I want to create a simple eclipse plugin, which does: When you right click
In Java, is it possible to create a class definition on the fly while
Is it completely against the Java way to create struct like objects? class SomeData1
At what point would you create your own exception class vs. using java.lang.Exception? (All
I've found a task on some Java programming competition. One must create class Sentence
How to create a java.awt.Image from image data? Image data is not pure RGB
Using Eclipse 3.6.1 Java 1.6.0_26 JMockit 0.999.10 UPDATE: I was able to create a
I have a Java Project , for which I'm now creating a Web interface,
I'm trying to create a web user interface for a Java application. The user

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.