Sample 1. Check if the String contains specified characters using CharSetUtils (Apache Commons)
System.out.println(CharSetUtils.containsAny("Whats Up ?", "W")); // Prints true as the String contains character W System.out.println(CharSetUtils.containsAny("Whats Up ?", "YZ")); // Prints false as the String doesn't contain character Y or Z