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
