Computer Applications
Give the output of the following string functions:
- "MISSISSIPPI".indexOf('S') + "MISSISSIPPI".lastIndexOf('I')
- "CABLE".compareTo("CADET")
Related Questions
Write a Java program to enter any sentence and convert the sentence to uppercase. Print only those words of the sentence whose first and last letters are the same.
Write a program in Java to enter any sentence. Also ask the user to enter a word. Print the number of times the word entered is present in the sentence. If the word is not present in the sentence, then print an appropriate message.