In your case is does not change anything. Let's compile:
public class Toto { public static void main(String[] args) { int a = 5 + 5 + 5 + 5 + 5; int b = 5 * 5; }}
and check the decompilation result:
public class Toto{ public static void main(String args[]) { byte byte0 = 25; byte byte1 = 25; }}
The compiler did inline everything.