21. Which of the following is true about string concatenation in Java?
22. How do you find the index of the last occurrence of a substring in a string in Java?
23. In Java, what is the purpose of the endsWith() method of a String object?
24. What is the purpose of the toLowerCase() method of a String object in Java?
25. Which method is used to extract a substring from a string in Java?
26. In Java, what is the purpose of the isEmpty() method of a String object?
27. What is the result of the expression "Hello".toUpperCase().toLowerCase() in Java?
28. How do you check if a string contains a specific character in Java?
29. What is the purpose of the substring() method of a String object in Java?
30. How do you find the first index of a specified character in a string in Java?
Read More Section(Strings)
Each Section contains maximum 100 MCQs question on Strings. To get more questions visit other sections.