Okay, i'm a beginner learning from "Java Beginner Guide" Book from Herbert Schildt. Here is piece of code i run across when learning for loop chapter.
the code basicly ask for user input and if the user input match with condition which is "s" the loop wont start, if its match its star and print "pass# + i" each time its iterates.
my question is why when i input anything except "s" the output is two line of "pass#"? why not just one line?
System.out.println("pls type s");
for( i = 0; (char) System.in.read() != 's'; i++)
System.out.println("pass#" + i);