# why Loop-Programm always terminates

well-known that a loop-programm in Theoretical computer science always terminates, but why do that java example not?

for( ; ; ){ }

• In theoretical computer science a loop program will not terminate. Oct 2 at 8:42
• Nir, a loop program is a program in a specific language where the maximum number of iterations of each loop is calculated before loop starts, and that doesn’t allow recursion. With these limitations, it always ends. Oct 2 at 15:10

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”.