Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Quick way to find index of object in arraylist?

818447Nov 24 2010 — edited Nov 24 2010
Hi, I have an arraylist of Doubles, i was wondering if there was any way to get the index of an element inside the list?
indexOf(Object o)
I think this wants me to have a copy of the actual object rather than letting me do this for example:
indexOf(20.5)
Is there any quick way i can do this?

Edited by: 815444 on 24-Nov-2010 10:22
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 22 2010
Added on Nov 24 2010
13 comments
363 views