Hi, While retrieving objects from the ArrayList after storing them, will they be returned in the SAME ORDER ALWAYS? Are there any particular reasons for the same? Thanks, Sam.
hi, objects are retrived in the same order as it was stored. because when storing object in the container(arraylist) internally reference code is created in sequential basis which will be used during retrive. one more reason, arraylist is not synchronized. thanks, velmurugan.v
Classes in the java "collections" API are characterized by the interfaces they implement. Take a look at the JavaDocs for ArrayList. You will find that it implements List - this requires it to keep references in a strictly defined order. The way to understand the collections API is by understanding the interfaces. Bill
I'd appreciate it if you pronounced my name correctly. Pinhead, with a silent "H". Petite ad: