how to check if a string includes a character java code example Example: java if string contains character if (string.contains(character)