title: Is it possible to compare two booleans with an &&?
body: <p>In my project I have to see if two Booleans are set to true. I can't put an &amp;&amp; in the if statement because it results in errors. Is there a way to check if two Booleans are true in an if statement?</p>
  
  <p>EDIT: to the request to see the code:</p>
  
  <pre><code>//Declarations at top of code
      Switch longplay_button;
      boolean longplay_buttonChecked = false;
      boolean normal_buttonClicked = false;
  
  
        } else if **(normal_buttonClicked = true**  &amp;&amp; longplay_buttonChecked = false) {
                      inactiveButton.setImageResource(R.drawable.button_default);
                      inactiveButton.setEnabled(false);
                      meme_Sound_Media_Player.release();
                      memeSoundMediaPlayer.start();
  //All within on click listener. If button is pressed and longplay switch isn't play shorter sound.
  
                  }
  </code></pre>
  
  <p>Error is ****bolded**** it's just a red underline in the IDE</p>