We are given two strings consisting of lowercase English letters. The length() method returns the number of characters in a string. Adding the lengths of both strings gives the required result.