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 1078733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:45:59+00:00 2026-05-16T21:45:59+00:00

Possible Duplicates: Do Hibernate table classes need to be Serializable? What does Serializable mean?

  • 0

Possible Duplicates:
Do Hibernate table classes need to be Serializable?
What does Serializable mean?

public class ExampleEntity implements Serializable
{
     @Id
     private long id;
     private int fieldInt;
     private long fieldLong;
     private String fieldString;
 }

I am looking after JPA tutorials. I am able to understand the basic concepts, but in all the tutorials they have added, this serializable. What is the purpose of this? How does that help me?
Any suggestions Please?

  • 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-16T21:45:59+00:00Added an answer on May 16, 2026 at 9:45 pm

    It means that the class can be serialized. This means that it can be converted into an stream of 0’s and 1’s and be sent to other service, like a webservice or and ORM (hibernate) or whatever. Then this service knows how store the stream.

    Also, your program can receive a serialized class and create an instance for it from the stream of 0’s and 1’s.

    It’s the way to “save” instances of classes and “restore” them at any other moment in time.

    More info at

    • http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html
    • http://en.wikipedia.org/wiki/Serialization

    To be able to make a class serializable, you must implement the interface “Serializable”.

    • Why so? Because when the moment to serialize a class arrive, the function writeObtject will be called to convert the object into bytes. On the other hand, when you have the bytes and you want to get the instance of the class, the function readObject will be called.

    • Why is not automatic? A variable value it’s already represented by bytes. Because the problem comes for example when a class holds instances of other classes. What do you do? You serialize the other classes as well? You just keep the reference address? It’s pretty complex and it may be dependant on your type of project and design.

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

Sidebar

Related Questions

Possible Duplicates: Abstract classes vs Interfaces Abstract class and Interface class? Hi All, I
Possible Duplicates: myVar = !!someOtherVar What does the !! operator (double exclamation point) mean
Possible Duplicates: What does the PHP syntax $var1->$var2 mean? Reference - What does this
Possible Duplicates: Reference - What does this symbol mean in PHP? Should I use
Possible Duplicates: C++, removing #include<vector> or #include<string> in class header Forward declare an STL
Possible Duplicate: What does the @ symbol before a variable name mean in C#?
Possible Duplicates: How to reference an indexer member of a class in C# comments
Possible Duplicates: How does an underscore in front of a variable in a cocoa
Possible Duplicates: Java String.equals versus == whats the difference between ".equals and ==" public
Possible Duplicate: Remove duplicates using only a MySQL query? I have a table with

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.