Question: How can you take an array and put it into a stack???? I have a card array with a deck of cards that gets shuffled then I need to change it to a stack and print the first number on top. Anyway anyone can help?

Answer: 
You can use [Collections.addAll](https://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#addAll(java.util.Collection,%20T...))

```
Card[] cardsArray;
Stack<Card> cards = new Stack<>();
Collections.addAll(cards, cardsArray);

```
There is not a single line command that would change/convert your array into a stack format. You have to do it yourself.

You haven't posted some code either, so we will have to make some assumptions.

If the array consists of Card-type-objects then what you have to do is this: 

```
Card[] deck; //your array

Stack<Card> deck_stack = new Stack<Card>(); //the newly created stack
//pass the array objects into the stack
for(int i=0; i<deck.length; i++) {
   deck_stack.add(deck[i]);
}
//take out the first stack object
System.out.println("Top of the deck: "+deck_stack.pop());

```