Setting a textView equal to a value in an Array Java : <p>I have written some simple code to generate a random value in my array. It generates that random value, but I cannot set my textView equal to that value. This is a very simple problem, but I can't seem to find the solution anywhere.</p>

<p>Here is my code...</p>

<pre><code>final String[] group_topics = {"Walking", "Swimming", "Running"};

public void getRandomTopic1() {
    Random random = new Random();

    int index = random.nextInt(group_topics.length);

    topicOne.setText(group_topics[index]);



    topicOne = (TextView) findViewById(R.id.textView2);
}
</code></pre>
