are equal to the string str2 (not case sensitive).
7 of 7 Paper No: 1
getLastWord(str: String): String - return the last word in the string str with the first letter in uppercase
The program output might look something like this:
1. Test countWords()
1. Test countWords()
2. Test getLastWord()
2. Test getLastWord()
Enter TC(1 or 2):1
Enter TC(1 or 2):2
Enter the string str1:hello world hello world
Enter a string:hello world
Enter the string str2: HeLLo
OUTPUT:
OUTPUT:
2
World
Zoom
+ 100%
Close