java array contains object code example
Example 1: check if object in array java
Arrays.asList(yourArray).contains(yourValue)
Example 2: arrays .contains methof
private static final Set<String> VALUES = Set.of(
"AB","BC","CD","AE"
);
Arrays.asList(yourArray).contains(yourValue)
private static final Set<String> VALUES = Set.of(
"AB","BC","CD","AE"
);