Why there are no global variables in Java?
Answers
Answered by
0
Java doesn't support global variables, by design. Java was designed with object-oriented principles in mind and as such, every variable in Java is either local or a member of a class.
sreeragm1999pbwcd0:
hope this helps you
Answered by
0
hey friend!
Global variables are usually a design flaw.
you are components should be self contained and should not need any Global state instead use private static fields.
for more information you see on Google app store. ok
HOPE it helps you.
Global variables are usually a design flaw.
you are components should be self contained and should not need any Global state instead use private static fields.
for more information you see on Google app store. ok
HOPE it helps you.
Similar questions
Social Sciences,
6 months ago
Geography,
6 months ago
Math,
1 year ago
Social Sciences,
1 year ago
Math,
1 year ago
Math,
1 year ago