Global Variables and Garbage Collection

Will the JVM garbage collection clean up global variables? Is a good practice to only use global variables when needed and mainly use local variables?
[157 byte] By [smayea] at [2007-10-2 22:10:32]
# 1
> Will the JVM garbage collection clean up global variables?Define "global variable" with respect to java.>Is a good practice to only use global variables when needed Is it good practice to do anything that isn't needed?
IanSchneidera at 2007-7-14 1:27:21 > top of Java-index,Java Essentials,Java Programming...
# 2
Garbage collection never "cleans up" variables. Its only function is to dispose of objects that are not referenced any longer.
DrClapa at 2007-7-14 1:27:21 > top of Java-index,Java Essentials,Java Programming...