javajvmbytecodejvm-bytecodejavacompiler

Bytecode size of with brackets vs without brackets in Java


Which has a larger bytecode size or the same in Java?

if (a > b) a = b;

vs

if (a > b) {
    a = b;
}

Solution

  • These compile to precisely the same thing.