Explanatory Question
What will the following code output:
String s = "malayalam";
System.out.println(s.indexOf('m'));
System.out.println(s.lastIndexOf('m'));
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.