answersLogoWhite

0


Best Answer

If the passed object extends Collection, then all the objects in collection are added to the arraylist.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What happens when you pass an object as an argument to addAll fucntion of arraylist?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you convert an ArrayList to a HashMap?

Unfortunately, there seems to be no built in way of adding all elements of a list to a map. This means that we need to iterate through each element of the ArrayList and add it to the HashMap individually./*** Generic method to add all elements from source into dest.*/public static final void addAll(final ArrayList source, final HashMap dest) {// Iterate through each element in source and put it in dest.for (int i = 0; i < source.size(); ++i) {// We will use the index of each element of source as the key in dest.dest.put(i, source.get(i));}}Sample use:// Create a new ArrayList and add some stuff to it.ArrayList list = new ArrayList();list.add(1); list.add(2); list.add(3);list.add(4); list.add(5); list.add(6);list.add(7); list.add(8); list.add(9);// Print out our listSystem.out.println(list);// Create a new map and call our functionHashMap map = new HashMap();addAll(list, map);// Print out to verify identical contentsSystem.out.println(map);


What does the AddALL website sell?

The AddALL website allows one to search for used or out-of-print books on various websites. It simplifies the process of searching multiple websites by compiling all results into one place.


Source vest pocket book Dennison Handbook for Engineers?

Engineer's Vest Pocket Book by W.A. Thomas, originally printed in 1930... reprinted by Dennison... I went through a number of copies in the 60's until it went out of print. Not currently in print but used copies can be found. First edition recently sold on ebay for less than $10 but most places will ask considerably more. Try FetchBook or AddAll and expect to pay at least $20.


How valueable is the book The Ancient World by David T Ansted?

The website http://used.addall.com is a useful rough guide to the selling prices of used books, since it aggregates search results from 20+ online booksellers, which include listings from thousands of individual dealers. As of 10/23/07, the print-on-demand reprint editions seem to be going for $30-40 (US), and the original 19th century editions for upwards of $500. HOWEVER, keep in mind that the listings on Addall only take in books that have *not* yet sold at the prices listed. If there are only a few, freakishly high listings for a given title, it may be that there is no demand for the title at that price. ALSO, keep in mind that the price you'd get selling to a book dealer will be less than the retail price that some collector might be willing to pay. A historian working on 19th century science would probably save money by buying the reprint (being more interested in the text than in the book as an object), so the market probably consists of collectors only. If you're interested in turning the book into ready cash, your best bet is probably to run an internet search for "book dealers" + "rare" + "geology" (or "natural history") . . . the result will give you some sense of who sells to collectors of old geology books, and might be interested in making an offer. Throwing it up on EBay *might* get you a serious bidder . . . but the odds are against it in my experience. ABVR (Professional Historian and Amateur Online Bookseller)


What is the book The Complete Illustration of the Celestial Art of Astrology by E Sibley worth?

I assume you mean monetarily . . . generally the best place to find a books value is on addall.com. They only have one listing similar to the title you listed, but of course, one needs to know the edition of the book in question. If you own this edition you have a valuable piece. This is the addall listing link . . . http://used.addall.com/SuperRare/submitRare.cgi?author=&amp;title=+A+New+And+Complete+Illustration+Of+The+Celestial+Science+of+Astrology%3A+Or+The+Art+Of+foretelling+future+Events+and+Contingencies%2C+By+The+Aspects%2C+Positions%2C+and+Influences%2C+of+the+Heavenly+Bodies+Founded+On+Natural+Philosophy%2C+Scripture%2C+Reason%2C+And+The+Mathematics+In+Four+Parts+Part+I+An+Enquiry+into%2C+and+Defense+of%2C+AstrologyPart+II+Examples+for+acquiring+a+Practical+Knowledge+of+AstrologyPart+III+Meteorological+Astrology+defined+and+explainedPart+IV+The+Distinction+between+Astrology+and+the+Diabolical+Practice+of+Exorcism+&amp;keyword=&amp;isbn=&amp;order=TITLE&amp;ordering=ASC&amp;dispCurr=USD&amp;binding=Any+Binding&amp;min=&amp;max=&amp;timeout=20&amp;match=Y&amp;store=Abebooks&amp;store=AbebooksDE&amp;store=AbebooksFR&amp;store=AbebooksUK&amp;store=Alibris&amp;store=Amazon&amp;store=AmazonCA&amp;store=AmazonUK&amp;store=AmazonDE&amp;store=AmazonFR&amp;store=Antiqbook&amp;store=Biblio&amp;store=Biblion&amp;store=Bibliophile&amp;store=Bibliopoly&amp;store=Booksandcollectibles&amp;store=Half&amp;store=ILAB&amp;store=LivreRareBook&amp;store=Powells&amp;store=Strandbooks&amp;store=ZVAB The next best site is half.com. They have a similar title as well. The following link will take you there. . . http://product.half.ebay.com/_W0QQprZ45417032QQcpidZ1294594006 Hope this helps.