java array contains 1

java array contains

Arrays.asList(yourArray).contains(yourValue)

Here is what the above code is Doing:
1. Convert your array to a list
2. Check if the list contains your value

Similar Posts