+ 1
Is for(;;); is correct?
4 Answers
0
you can take parts of a loop. I thibk this is an endless loop.
0
That's similar to
while(true)
0
It is valid. It is the same as while(true)
0
This is an overloaded question, the syntax is correct but in reality it's pointless, unless you have a way to break out of the loop you are stuck in an endless loop and if you choose to do something interesting within the loop like creating new objects dynamically, you can watch your code slowly drain your computers memory until it runs out of memory, if your lucky you can watch your program crash, raise an exception, but don't be alarmed, the jvm Will call upon the GC to clean up your mess as soon as your program crashes, if your on a school network computer you can try this & wait on your network administrator to contact you lol