I have an application where I am trying to get the users to answer a series of questions as they register an account. They will then be asked those questions later as a form of memory test. I have an open question feature already implemented however the answers to the questions are hard coded. I want to get the values the user would input during registration in the "answers" string.

Code for the Question and Answer database:

```
package com.example.memory;

public class QuestionDatabase {

    public static String[] questions = {
            "What time did you wake up?",
            "What do you do first when you wake up?",
            "What did you have for breakfast?",
            "What time did you go to bed last night?",
            "What is your favorite colour?",
            "What is your favorite movie?",
            "What is your favorite food?",
    };

    public static String[] answers = {

            "9",
            "Bathroom",
            "Coffee",
            "11",
            "Blue",
            "Avengers",
            "Pizza",
    };

}

```

And here is the code for where the question is asked:

```
package com.example.memory;

public class Q1 extends AppCompatActivity {

    Button save1;
    EditText ans1;
    String answer1;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_q1);

        save1 = (Button) findViewById(R.id.save1);
        ans1 = (EditText) findViewById(R.id.ans1);
        answer1 = ans1.getText().toString();

        save1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                save1();
            }
        });

    }

    public void save1() {
        Intent intent = new Intent(this, LoginActivity.class);
        intent.putExtra("", ans1.getText().toString());
        startActivity(intent);
    }
}

```

How can I get the value entered in "ans1" into the String [] answers section of the QuestionDatabase.