So I'm making a code that uses int value in a string(hardcoded btw), it works but when I incremented the value of the int by button click, the int in the string does not change as the increment.
int indexOfQuestion= 1;
numberOfQuestion.setText("Question " + indexOfQuestion + " from " + lengthOfQuestion + " :" );
switch(v.getId()):
case R.id.next:
indexOfQuestion = indexOfQuestion+1;
so when I clicked the button, indexOfQuestion in numberOfQuestion stays 1. How do i change it automatically as I intended without long verbose codes? thanks