title: Android Studio - How to create a back button on randomly selected strings?
body: <p>I have an array of strings that I am displaying in my activity using a random number every time a button called <strong>Next</strong> is clicked. How do I create another button called <strong>Back</strong>, that simply displays the previously or last generated strings in the order they were randomly generated?. So that instead of clicking next to generate another string, I can click <strong>Back</strong> at any time to view all the previous strings one by one and then click <strong>Next</strong> again to continue the random selection.</p>