class ContinueDemo { public static void main(String[] args) { String searchMe = “peter piper picked a peck of pickled pepers”; int max

Minh Tiến

New member
class ContinueDemo {
public static void main(String[] args) {
String searchMe = “peter piper picked a peck of pickled pepers”;
int max = searchMe.length();
int numPs = 0;
for (int i = 0; i < max; i++) {
if (searchMe.charAt(i) != 'p') continue;
numPs++;
}
System.out.println(“Found“ + numPs + “p 's in the string.”);
}
}'</blockquote>
Chương trình sau ra kết quả là gì?

A. Found 9 p's in the string.
B. Found 8 p's in the string.
C. Found 10 p's in the string.
D. Không có đáp án đúng.