i'm trying to compile 4 integers from 4 different activities. the first activity is one of the 4 integer. the second activity is where i compile them.. I don't know what's the best way to send a value from different activites. Most of the intent methods i saw uses startActivity but still won't work.
public class QuizSecond extends AppCompatActivity implements View.OnClickListener{
TextView totalQuestionsTextView2;
TextView questionTextView2;
Button ansA2, ansB2, ansC2, ansD2;
Button submitBtn2;
int score= 0;
int totalQuestion2 = QuestionAnswer2.question2.length;
int currentQuestionIndex2 = 0;
String selectedAnswer2 = "";
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_quiz_second);
    totalQuestionsTextView2 = findViewById(R.id.total_question2);
    questionTextView2 = findViewById(R.id.question_preview);
    ansA2 = findViewById(R.id.ans_A2);
    ansB2 = findViewById(R.id.ans_B2);
    ansC2 = findViewById(R.id.ans_C2);
    ansD2 = findViewById(R.id.ans_D2);
    submitBtn2 = findViewById(R.id.submit_btn2);
    ansA2.setOnClickListener(this);
    ansB2.setOnClickListener(this);
    ansC2.setOnClickListener(this);
    ansD2.setOnClickListener(this);
    submitBtn2.setOnClickListener(this);
    totalQuestionsTextView2.setText("Total questions : "+totalQuestion2);
    loadNewQuestion();
}
@Override
public void onClick(View view) {
    ansA2.setBackgroundColor(Color.WHITE);
    ansB2.setBackgroundColor(Color.WHITE);
    ansC2.setBackgroundColor(Color.WHITE);
    ansD2.setBackgroundColor(Color.WHITE);
    Button clickedButton = (Button) view;
    if(clickedButton.getId()==R.id.submit_btn2){
        if(selectedAnswer2.equals(QuestionAnswer2.correctAnswers2[currentQuestionIndex2])) {
            score++;
        }
        currentQuestionIndex2++;
        loadNewQuestion();
        Intent quizIntent = new Intent(QuizSecond.this,ComputeActivity.class);
        quizIntent.putExtra("EXTRA_NUMBER",score);
    }
    else{
        //choices button clicked
        selectedAnswer2  = clickedButton.getText().toString();
        clickedButton.setBackgroundColor(Color.MAGENTA);
    }
}
void loadNewQuestion(){
    if(currentQuestionIndex2 == totalQuestion2 ){
        startActivity(new Intent(QuizSecond.this, ComputeActivity.class));
        return;
    }
    questionTextView2.setText(QuestionAnswer2.question2[currentQuestionIndex2]);
    ansA2.setText(QuestionAnswer2.choices2[currentQuestionIndex2][0]);
    ansB2.setText(QuestionAnswer2.choices2[currentQuestionIndex2][1]);
    ansC2.setText(QuestionAnswer2.choices2[currentQuestionIndex2][2]);
    ansD2.setText(QuestionAnswer2.choices2[currentQuestionIndex2][3]);
}
}
second activity:
int number = getIntent().getIntExtra("EXTRA_NUMBER",0); if (number > 3){ Toast.makeText(ComputeActivity.this, "Your Message", Toast.LENGHT_LONG).show();}
 
    