I know there are many similar questions if not the same, but I cant get my head around it. I am wanting to get "mScore" which is a variable in my main activity to show on the end of a string which is in my results layout. This is to get their final score and show on my results page as "You Scored : mScore"
Here is some of my code
public int mScore = 0;
if (mButtonChoice1.getText() == mAnswer) {
mScore = mScore + 1;
updateScore(mScore);
}
private void updateScore(int point){
mScoreView.setText(""+mScore);
}
Again apologies for possible duplicate but I did not understand the other answers and am hoping i will understand better when it's specific for my situation. Only started learning java a week or 2 ago so i'm a bit slow.