How do you make the computer select random elements from an array? : <p>I tried looking at other similar topics about this issue, but none of them solved my issue. I have basically made an array, that consists of animal names, and I am trying to tell the computer to select a random animal name, but I don't know how to do that.</p>

<p>I've already tried to use math.random, but it always sends back a random index value which is just a number. I don't want it to send a random number, but a random string.</p>

<pre><code> String[] animalNames = {"Raven","Chameleon","Lion","Cheetah"};
</code></pre>

<p>So, I want to learn code that can allow the computer to randomely select an animal name. I expect it to input the animal name which is the element but not the index, which is just a number.</p>
