First off, the compiler does not output the result of the statements. It converts the statements to bytecode as mentioned by kishan. Memory allocation is done by the JVM at run-time. Before runtime, no memory is allocated at all.
During runtime, the JVM will set aside 32 bits of space to store v, then assign a value to that space (5), replace that value with the sum of v and 5. result of v+5 is stored in a temporary location before overwriting v itself.