android – Load previous question in tabLayout (java)-ThrowExceptions

Exception or error:

Load previous question on tabLayout using viewPager in android studio

 // get previous question
private void getPreviousQues() {
    if (questionCounter < questionCounterTotal){
        currentQuestion = questionList.get(questionCounter);
        answered = true;
        if (questionCounter < questionList.size()) {
        } else if (questionCounter == questionList.size())
            Toast.makeText(this, "ss", Toast.LENGTH_SHORT).show();
    }else {
        Toast.makeText(this, "Sorry ", Toast.LENGTH_SHORT).show();

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *