Check out example codes for "check if object in array java". It will help you in understanding the concepts better.

Code Example 1

Arrays.asList(yourArray).contains(yourValue)

Learn ReactJs, React Native from akashmittal.com