java check if string contains a letter code example Example: java if string contains character if (string.contains(character)