1.can a uninitialized variable in java get memory?if yes,then why can't we use it before initialization.
Yes uninitialized variable in JAVA is assigned memory. By default uninitialized variable contains garbage values which is of no use to you in your program and that is the reason their is no meaning of using it before initialization.