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

Question 1(iv)

1 mark

Computer ScienceISC 2022 Computer Science - Specimen paper (Semester 2), Paper 1Short answerArrays, Strings

Answer the following question.

Write the statement in Java to extract the word “MISS” from the word “SUBMISSION”.

Answer

Answer

String s = "SUBMISSION".substring(3, 7); The characters at index 3 to 6 are M, I, S, S, so s holds "MISS".