well-known that a loop-programm in Theoretical computer science always terminates, but why do that java example not?
for( ; ; ){ }
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It only takes a minute to sign up.
Sign up to join this communitywell-known that a loop-programm in Theoretical computer science always terminates, but why do that java example not?
for( ; ; ){ }
Bounded loops terminate, unbounded (as in your example) don't necessarily terminate.
In a “loop program”, the maximum number of iterations for each loop needs to be calculated before the loop starts iterating. In your example that is not the case, so you can’t draw any conclusions that you can draw for “loop programs”.