- 1
Can you share a boolean between 2 classes
I have a boolean called enable and in my fist class I made a system to switch it's value. in my other class I am trying to check for the boolean in the other class. but it doesn't find it.
1 Resposta
0
The boolean either needs to be public, or you need to create a getter to obtain the value.