Prashnikaप्रश्निका
Code
About
‹ Back to the paper

Question 44

1 mark

Computer ScienceISC Computer Science - Competency Focused Practice Questions (CISCE, August 2024)Short answerArrays, Strings

Answer the following question.

The java statement to print the position of 2nd occurrence of the letter 'I' within the word…

The java statement to print the position of 2nd occurrence of the letter 'I' within the word "MICHIGAN".
Open in the 2D array visualiser

Answer

Answer

System.out.println("MICHIGAN".indexOf('I', "MICHIGAN".indexOf('I') + 1));