Java: Check if an array contains a value next to each other

Java: Check if an array contains a value next to each other

More to explore

Based on this image's title: “Java: Check if an array contains a value next to each other