0
can we change a static variable value by using it on other classes ?
if in my first class I declared a static variable a=10 . can I change that value in other class by calling it by Class.a ?
1 ответ
+ 2
If the static variable is public, then yes.
if in my first class I declared a static variable a=10 . can I change that value in other class by calling it by Class.a ?