Advertisements
Advertisements
प्रश्न
System.out.println("Computer Science"
lastlndexOf('E')):
The output of the statement given above will be:
विकल्प
8
7
−1
15
MCQ
Advertisements
उत्तर
−1
Explanation:
The lastlndexOf() function finds the index of the last occurrence of the argument in the string. If 'E' is not found in "Computer Science", the function returns −1. So the output is −1.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2021-2022 (March) Official Board Paper
