How exactly a JVM does this is entirely up to the JVM and shouldn't matter for a programmer, since the compiler ensures that you do not read uninitialized local variables. On the other hand, Fields are different. They don’t require to assigned before reading them unless they are Final type.
The value of a field that has not been assigned is
null for reference types or the
0 value of the appropriate primitive type if the field has a primitive type.
I hope I cleared the things for you. If you have further queries, please reply to this thread.