java how to check if an object is in an array by value code example Example: check if object in array java Arrays.asList(yourArray).contains(yourValue)