I one day about ʻelse if` in java
if (flag) {
System.out.println("Hi!");
}
Omitting the curly braces (it is better to use the ternary operator, but I will not consider it here)
if (flag)
System.out.println("Hello!");
Can be. Maybe else-if
if (flag) {
System.out.println("Hello!");
} else {
if (flag2) {
System.out.println("Hello World");
} else {
System.out.println("hi");
}
}
I thought it might be the one that omitted the curly braces.
Checks if the bytecodes (class files) with and without curly braces match.
It seems to be the same when compared with the fc command.
https://arakik10.hatenadiary.org/entry/20161206/p1 https://www.k-tanaka.net/cmd/fc.php
Recommended Posts