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