Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@TheFBI Well if this is Java, you can't initialize a variable with a double =
And when that's fixed, well it's just an infinite empty loop, but still a valid instruction. -
And if the whole thing is a string... Well it's not affected to any variable. Still a compilation error.
-
@CtrlAltElite JVM throws the loop out tho, since there is nothing in it. Java discards empty loops, which is a pain when you're trying to wait a bit...
He's also missing a semicolon after. There's no exceptions, just compile time errors like you said. -
loopback5687y@nanoandrew4 If you just want to wait a moment why not use Thread.sleep() instead of empty loops?
-
@loopback Yeah but when I moved from C++ to Java I was super confused as to why my waiting loops didn't work 😶 now I know better, I just recently watched some stuff on the JVM optimizing code and heard that those loops get tossed... Good to finally know what happened to those.
Related Rants
"boolean tree == true;while(tree){}"
Find the exeception xd!
undefined
java