Well, if you are declaring, obviously, it is a local variable. If you are initializing, then it depends on how the variable was declared.
Whether a variable is on the heap or stack depends on the type of variable. Beginning with
Java 6, this is further complicated with escape analysis.
Henry