I would like to program in java two Boolean variables which are corelated in a way that one is allways false and one allways true. So if you set one to true the other one would automaticly change to false.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Don’t use variables – use methods.
Before using variables
make this better like so: use a single piece of data (which is what you really have) and use methods for the logic.