answersLogoWhite

0

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

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
JudyJudy
Simplicity is my specialty.
Chat with Judy
ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi

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