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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:25:25+00:00 2026-06-03T06:25:25+00:00

In Java library, what is the reason that the Collection interface doesn’t extend Cloneable

  • 0

In Java library, what is the reason that the Collection interface doesn’t extend Cloneable and Serializable interfaces?

  • 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-03T06:25:26+00:00Added an answer on June 3, 2026 at 6:25 am

    Collection is an interface that specifies a group of objects known as elements. The details of how the group of elements is maintained is left up to the concrete implementations of Collection. For example, some Collection implementations like List allow duplicate elements whereas other implementations like Set don’t. A lot of the Collection implementations have a public clone method. However, it does’t really make sense to include it in all implementations of Collection. This is because Collection is an abstract representation. What matters is the implementation. The semantics and the implications of either cloning or serializing come into play when dealing with the actual implementation; that is, the concrete implementation should decide how it should be cloned or serialized, or even if it can be cloned or serialized. In some cases, depending on what the actual backing-implementation is, cloning and serialization may not make much sense. So mandating cloning and serialization in all implementations is actually less flexible and more restrictive. The specific implementation should make the decision as to whether it can be cloned or serialized.

    Here’s an explanation from Oracle’s documentation:

    Many Collection implementations (including all of the ones provided by
    the JDK) will have a public clone method, but it would be mistake to
    require it of all Collections. For example, what does it mean to clone
    a Collection that’s backed by a terabyte SQL database? Should the
    method call cause the company to requisition a new disk farm? Similar
    arguments hold for serializable.

    If the client doesn’t know the actual type of a Collection, it’s much
    more flexible and less error prone to have the client decide what type
    of Collection is desired, create an empty Collection of this type, and
    use the addAll method to copy the elements of the original collection
    into the new one.

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

Sidebar

Related Questions

Is there a standard Java library that handles common file operations such as moving/copying
Does anyone knows a java library that could easily encode java Maps into json
Is there any free Java library for extracting text from PDF, that is compatible
There's a Java library that I would like to use in my project. My
I have a Java library that uses a few things from the Android APIs.
I've seen in some examples (e.g. [this][1][1]: http://www.ibm.com/developerworks/java/library/j-jsf2fu3/ ) that subcomponent can see attributes
Does exists a java library that can create sql statements? I'm not in search
Is there a java library or framework (other than the javax.comm provided by Sun)
I need a Java library to convert PDFs to TIFF images. The PDFs are
I am using a java library (edtftpj) to FTP a file from a web

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.