How to randomly push elements into stack from an array?
<p>char[] colors={'R','G','B','Y','W'};</p>

<pre><code>Scanner sc=new Scanner(System.in);
Stack stack=new Stack();

void push(){
        for(int i=0; i&lt;15; ++i){

            stack.push();
        }
</code></pre>

<p>I've got an array of colors and i want to push random colors into a stack unto 15 elements. How can i push and display all the elements in the stack.</p>