What will be the output of following program?
public class SubString1 {
public static void main(String args[]) {
String cmptr = "it is my computer, my computer works good";
int count = 0;
for (int i = 0; i < cmptr.length(); i++) {
if (cmptr.substring(i, i + 1).equals("m"))
count++;
}
System.out.print(count);
}
}