Is "else if" one whole or two separate keywords in Java?

I was fortunate enough to read practical material for SCJP , and I just stumbled over the head of flow control and others, where they give the impression that " else if" is the key word of my choice. I always thought it was just normal else, containing only a block if, brackets are omitted.

So what is this?

Edit: I would like to emphasize that this issue is more relevant to the category of “pique my interest” than to “serious business”.

+5
source share
8 answers

, - Java else if. , , if else.

EDIT: / , -, , else if (, , ), , /, .

+10

, .

+6

else {
    if { ... }
}
+6

.

else .

else, . if.

, else, if , . switch, else if.

+3

, . , else , .

Java

+1

"elsif", "elseif" "else if" ( case), Java .

+1

Java, C , Java C.

, , . .

0

, "if".

0

All Articles