answersLogoWhite

0

Why there are no global variables in java?

Updated: 8/20/2019
User Avatar

Wiki User

11y ago

Best Answer

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 namespac
User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why there are no global variables in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp