Java Topic Practice
String Traversal
Practice mode with 15 Java-focused questions, immediate answer checks, and explanations.
For practice use only.
String Traversal MCQ Practice
String Traversal Java practice with 15 questions, code tracing, and a worked explanation for every answer.
Question 1 of 15
Answered 0 of 15
Choose one answer.
Code Tracing 01 - String Traversal: track the final printed value.
String word = "ALGORITHM";
int count = 0;
for (int i = 0; i < word.length(); i++) {
char c = word.charAt(i);
if (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U') count++;
}
System.out.print(count);