- 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.

7th Aug 2016, 12:07 PM
SeaLanternYT
SeaLanternYT - avatar
1 Resposta
0
The boolean either needs to be public, or you need to create a getter to obtain the value.
7th Aug 2016, 3:06 PM
James
James - avatar