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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:13:52+00:00 2026-05-24T02:13:52+00:00

Here is one (typical?) example taken from the List.addAll doc that does not seem

  • 0

Here is one (typical?) example taken from the List.addAll doc that does not seem to say whether the additions to the target list will be deep copies. Other than testing, what is the general method of quickly parsing documentation or general understanding that allows a determination if standard Java classes and methods deep copy? Oracle writeup on List.addAll

addAll

boolean addAll(Collection<? extends E> c)

    Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation). The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)

    Specified by:
        addAll in interface Collection<E>

    Parameters:
        c - collection containing elements to be added to this list 
    Returns:
        true if this list changed as a result of the call 
    Throws:
        UnsupportedOperationException - if the addAll operation is not supported by this list 
        ClassCastException - if the class of an element of the specified collection prevents it from being added to this list 
        NullPointerException - if the specified collection contains one or more null elements and this list does not permit null elements, or if the specified collection is null 
        IllegalArgumentException - if some property of an element of the specified collection prevents it from being added to this list
    See Also:
        add(Object)
  • 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-24T02:13:52+00:00Added an answer on May 24, 2026 at 2:13 am

    Unless something specifies that it takes a deep copy, I’d always assume it doesn’t. It’s very rare that deep copies are taken, particularly as it relies on the objects themselves supporting cloning.

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

Sidebar

Related Questions

Here is one method that monkey patched the Dir[] method from autotest class Dir
Here's one from the No question's too dumb department: Well, as the subject says:
Here is one I am working on: var fStep = from insp in sq.Inspections
Interesting one here. I have an ASP.NET 1.1 project that contains a web service
I'll take away the obvious one here: mic and webcam support. Other than that,
My question is similar this one here: ResultsController to another ResultsController A typical app
I am trying to extract numbers from a typical scoreboard that you would find
Here is a typical URL I'm trying to rewrite: Example requested URL: http://topleveldomain/search?q=clause1+clause2+clause3&State=FL It
That may seem like a broad question, but I'm talking specifically here about apps
Here one more basic question asked in MS interview recently class A { public

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.