According to my scientific Java experimentation, int x = 0;
is equivalent to int x = 0;;
which is equivalent to int x = 0;;;;;;;;;;;;;;;
- Why does Java allow for this? Does it have any practical application?
- Are each of these just empty statements? Do they actually take up any extra processing time during runtime? (I would assume they're just optimized out?)
- Do other languages do this? I'm guessing it's something inherited from C, like a lot of things in Java. Is this true?