java 8 code to check if string contains charecters you want code example Example: java if string contains character if (string.contains(character)