‹ 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".
Answer
Answer
System.out.println("MICHIGAN".indexOf('I', "MICHIGAN".indexOf('I') + 1));