Java
class Gotcha { public static void main(String... args) { try { main(); } finally { main(); } } } No stack overflows here; move along.
At first glance, this should produce a
StackOverflowError, but it doesn't! It actually just runs forever (for all practical purposes at least; technically it would terminate after a time many orders of magnitude longer than the age of the universe). If you want to know how/why this works, see thisthis. Also, if you happen to be wondering why we can callmain()without arguments when the main method generally would need aString[]argument: it's because we've declared it to be variable-argument here, which is perfectly valid.