Where is Java's Array indexOf? -


i must missing obvious, i've searched on , can't find method.

there couple of ways accomplish using arrays utility class.

if array not sorted:

java.util.arrays.aslist(thearray).indexof(o) 

if array sorted, can make use of binary search performance:

java.util.arrays.binarysearch(thearray, o) 

Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -