I am new to Java programming. Can anyone tell what is the difference between global and local variable in Java?
解决方案
Your question is a little confused since you refer to static/global in the title, and global/local in your question.
static variables are tied to a class, and you will have one instance per class.
classes can have member variables, and you will have one instance per instance of that class.
Note that this is complicated further if you have multiple classloaders. In this scenario you can have multiple class definitions loaded, and consequently, possible multiple static variables.