I probably won't understand any answers since this is probably too complex for me right now.
Was learning about polymorphism today and thought the compiled code might show methods used to make my life easier in this scenario.
public static void main(String[] args) {
System.out.println(4 + 0.5);
int a = 4;
double b = 0.5;
System.out.println(a + b);
}
}```
The compiled code below:
```// Source code is decompiled from a .class file using FernFlower decompiler.
public class Main {
public Main() {
}
public static void main(String[] var0) {
System.out.println(4.5);
}
}```
**Now I've got a few thoughts:**
> Is the compiler essentially optimizing my code?
>
> There are two print statements in the original code but only one in the compiled code. How is it able to print twice?
>
> If the compiler is optimizing my code, would it be good practice to regularly check my compiled code to see what changes it makes?