DEV Community

Discussion on: The `else if` Keyword Doesn’t Exist in Java

Collapse
 
renegadecoder94 profile image
Jeremy Grifski • Edited

Maybe I was unclear, but the reason that this is so mind blowing to me is that else if isn’t a keyword. There is only elseand if. Python had to introduce a third keyword because else if isn’t valid syntax. In other words, else if comes for free in C-like languages due to the language grammar, and I had just assumed it was a special token.