title: How to set a boolean true again in Android?
body: <p>The <code>boolean isChecked</code> is declared first time <code>true</code>, than i set in the <code>OnClickListener</code> to <code>false</code>. What i neeed, is to set <code>boolean isChecked</code> again to <code>true</code> in the next <code>OnClickListener</code>. I know that are not in the same scope but how can i do that?
  This is my code:</p>
  
  <pre><code>answer[j].setOnClickListener(new View.OnClickListener() {
      private boolean isChecked = true;
  
      @Override
      public void onClick(View v) {
          RadioButton checkedRadioButton = ((RadioButton) v);
          if (isChecked) {
          if (checkedRadioButton.isChecked()) {
              score++;
              isChecked = false;
          }
          }
      }
  });
  
  resetButton.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View v) {
          isChecked = true;
          score = 0;
      }
  });
  </code></pre>
  
  <p>Thanks!</p>