dcsimg

Why does Java not support global variables?

John Mitchell

Because the designers of the language wanted a more pure object-oriented language than e.g., C++. Global variables just clutter up languages with no real benefit while introducing a number of problems such more layers of scoping and life-cycle timing issues. Switch your thinking over to more pure OO and you'll definitely be better off. :-)