So the other day when I was looking at the wikipedia page for Java bytecode I came across this example:
Consider the following Java code:
Goto statements in programming are one way statements where as function calls are two way switch that is it will return back to the called section of the code.
To use those only bytecodes use goto in them. In case if user is allowed to use goto means we may use it in a inefficient way (say unconditioned goto statement) which will never let the program to terminate.
Jvm is such intelligent that never let the program run infinitely.