Bench Lab · spring preview 3 of 3
A look at the spring
Spring preview: a loop that walks through a String one character at a time, using substring and counting from 0. No credit code here: this is a look ahead.
Job 1. One letter at a time
i goes 0, 1, 2, 3, 4. What is printed?
String word = "Treme";
for (int i = 0; i < word.length(); i++)
{
System.out.println(word.substring(i, i + 1));
}