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