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
Post a Comment