11. What is the purpose of the trim() method of a String object in Java?
12. Which of the following methods is used to replace all occurrences of a specified character in a string in Java?
13. What is the correct way to check if a string starts with a specific prefix in Java?
14. Which method is used to split a string into an array of substrings based on a specified delimiter in Java?
15. In Java, what is the purpose of the endsWith() method of a String object?
16. What method is used to convert an integer to a string in Java?
17. Which of the following is the correct way to compare two strings in a case-insensitive manner in Java?
18. In Java, what does the concat() method of a String object do?
19. How do you find the last index of a specified character in a string in Java?
20. What is the result of the expression "Java".replace("a", "o") in Java?
Read More Section(Strings)
Each Section contains maximum 100 MCQs question on Strings. To get more questions visit other sections.