I was playing around and added count++ String School = "Monkey"; for(int i = 0; i < School.length();i++) { count++; System.out.println(School.charAt(i)); } System.out.println("I have Counted " + count); run: M o n k e y I have Counted 6 BUILD SUCCESSFUL (total time: 0 seconds)
I was playing around and added count++
String School = "Monkey";
for(int i = 0; i < School.length();i++)
{
count++;
System.out.println(School.charAt(i));
}
System.out.println("I have Counted " + count);
run:
M
o
n
k
e
y
I have Counted 6
BUILD SUCCESSFUL (total time: 0 seconds)