Q 1:
Why there are no global variables in Java?
Ans:

Global variables are globally accessible. Java does not support globally accessible variables due to following reasons:
* The global variables breaks the referential transparency
* Global variables creates collisions in namespace.

As Java is OOP language, it focuses on data security, where the data field values can only be accessed by the methods that define it.