Java - expression must be an array type but it resolved to Stack<String>
<p>I am making a program where I declared a Stack and named it "words". I used this code, like so:</p>

<pre><code>Stack &lt;String&gt; words = new Stack&lt;String&gt;();
</code></pre>

<p>but when I tried to use this code to shuffle the words in it, an error about it being a stack appears:</p>

<pre><code>Collections.shuffle(words);
int mistakes = 0;
final String CORRECT_WORD= words[0];
</code></pre>

<p>how can i resolve this error?</p>
