A program where output seems simple but it's not because of java compiler optimization of the byte code.
From Java Specs:
If a primitive type or a string is defined as a constant and the value is known at compile time, the compiler replaces the constant name everywhere in the code with its value. This is called a compile-time constant. If the value of the constant in the outside world changes (for example, if it is legislated that pi actually should be 3.975), you will need to recompile any classes that use this constant to get the current value.
Nesta página do site você pode assistir ao vídeo on-line Java Tricky Program 1 - Java Compiler Optimization duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Diyansh IT Services 05 Janeiro 2016, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 37,600 vezes e gostou 316 espectadores. Boa visualização!