मराठी

Give the output of the following String class method: "COMMENCEMENT".lastIndex0f('M')

Advertisements
Advertisements

प्रश्न

Give the output of the following String class method:

"COMMENCEMENT".lastIndexOf('M')
थोडक्यात उत्तर
Advertisements

उत्तर

8

Explanation:

The lastIndexOf('M') returns the index of the last occurrence of 'M' in the string.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2022-2023 (March) Official
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×