0 works

Find Value in an Array in Java


dashboard+ Project

Posted by @starbucks #java

Code snippet:

Arrays.asList(yourArray).contains(yourValue)
content_copyCopy to Clipboard

More details:

This doesn't work for arrays of primitives.

Code snippet source:

https://stackoverflow.com/questions/1128723/how-do-i-determine-whether-an-array-contains-a-particular-value-in-java

>> Browse more code snippets

more_vert