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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:28:52+00:00 2026-05-30T14:28:52+00:00

.class files provide blue-prints for each type of object, and Java has rich functionality

  • 0

.class files provide blue-prints for each type of object, and Java has rich functionality for extracting the properties of an object, including all of its state.
So why we still need to implement serializable, can we just serialize automatically given the .class files?

  • 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-30T14:28:53+00:00Added an answer on May 30, 2026 at 2:28 pm

    Serializable interface in java is a Marker interface, which has no method or fields in it. It is simply implemented by class whose objects we may want to serialize.

    Moreover serialization is a costly affair because (Taken from Effective Java 2nd edition):

    1. A major cost of implementing Serializable is that it decreases the flexibility
      to change a class’s implementation once it has been released.
      When a
      class implements Serializable, its byte-stream encoding (or serialized form)
      becomes part of its exported API. Once you distribute a class widely, you are generally
      required to support the serialized form forever, just as you are required to
      support all other parts of the exported API.

    2. A second cost of implementing Serializable is that it increases the likelihood
      of bugs and security holes.

    3. A third cost of implementing Serializable is that it increases the testing
      burden associated with releasing a new version of a class.
      When a serializable
      class is revised, it is important to check that it is possible to serialize an instance in
      the new release and deserialize it in old releases, and vice versa.

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

Sidebar

Related Questions

so i have made some java files which provide some specific API functionality. I
Java .class files can be decompiled fairly easily. How can I protect my database
I generated .class files by the following command: javac -cp \directoryName\external.jar myPackageDirectory\First.java myPackageDirectory\Second.java I
Will the fact that java class files can be decompiled and need of third
I have a Java program that loads thirdparty class files (classes I did not
Java provides the jar file so that all the class files and jar files
Is there any tool that can remove debug info from Java .class files, just
Is there any way I can run class files (i.e. with main as the
I have a web application and two class files, First class is MyClass.class which
How do you batch decompile many class files?

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.