title: How can i access my Status variable in this code?
body: <p>I've created a variable named <strong>Status</strong> and i want to change it's value in <code>Report.setOnClickListener()</code> method. How can i do that?
  I have declared Status variable in final but when i want to change it's value, I got error.</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      private String Student_Name = "";
      private int Student_Grade = 0;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          EditText studentName = (EditText) findViewById(R.id.name);
          EditText studentGrade = (EditText) findViewById(R.id.grade);
          Button Submit = (Button) findViewById(R.id.submit);
          Button Report = (Button) findViewById(R.id.report);
  
          final ArrayList&lt;String&gt; infos = new ArrayList&lt;String&gt;();
          final String report = "";
          final boolean Status = true;
          for(int i = 0;Status != false;i++){
              String name = studentName.getText().toString();
              String grade = studentGrade.getText().toString();
              report = name + grade;
              Submit.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {
                      infos.add(report);
                  }
              });
              infos.add(report);
              Report.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {
                      Intent intent = new Intent(MainActivity.this,ReportActivity.class);
                      startActivity(intent);
                      Status = false;
                  }
              });
          }
  </code></pre>