title: Splitting Deck in-half error? Really easy, but I messed up
body: <p>I am trying to split a deck of cards into two arrays (one for the user, one for the computer)</p>
  
  <pre><code>static String [] deck = [52 cards here]
               static String [] userDeck = new String [26];
               static String [] computerDeck = new String [26];
  
           public static void deckSplit ()
               {
                for (int i = 0; i &lt;= 25; i++) {
                userDeck[i] = deck[2 * i];
                computerDeck[i] = deck[(2 * i) + 1];
                }
              }
  </code></pre>
  
  <p>but i get this error:</p>
  
  <pre><code>Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
      at war.Deck.deckSplit(Deck.java:47) [the part about the computerDeck]
      at war.War.main(War.java:28) [where i called the decksplit method]
  </code></pre>
  
  <p>EDIT:</p>
  
  <pre><code> static String [] deck = {"2 of Diamonds" + "\n2 of Hearts"+"\n2 of Clubs"+ "\n2 of Spades"+ 
                      "\n3 of Diamonds"+ "\n3 of Hearts"+ "\n3 of Clubs"+ "\n3 of Spades"+ 
                     "\n4 of Diamonds"+ "\n4 of Hearts"+ "\n4 of Clubs"+ 
                     "\n4 of Spades"+ "\n5 of Diamonds"+ "\n5 of Hearts"+
                     "\n5 of Clubs"+ "\n5 of Spades"+ "\n6 of Diamonds"+ 
                     "\n6 of Hearts"+ "\n6 of Clubs"+ "\n6 of Spades"+
                     "\n7 of Diamonds"+ "\n7 of Hearts"+ "\n7 of Clubs"+  
                     "\n7 of Spades"+ "\n8 of Diamonds"+ "\n8 of Hearts"+  
                     "\n8 of Clubs" +"\n8 of Spades"+ "\n9 of Diamonds"+ "\n9 of Hearts"+ 
                     "\n9 of Clubs"+ "\n9 of Spades"+  "\n10 of Diamonds"+  
                     "\n10 of Hearts"+ "\n10 of Clubs" + "\n10 of Spades"+   
                     "\nJack of Diamonds"+ "\nJack of Hearts"+ "\nJack of Clubs"+ 
                     "\nJack of Spades"+ "\nQueen of Diamonds"+ "\nQueen of Hearts"+  
                     "\nQueen of Clubs"+ "\nQueen of Spades"+ "\nKing of Diamonds" +   
                      "\nKing of Hearts" + "\nKing of Clubs" + "\nKing of Spades"+   
                     "\nAce of Diamonds"+ "\nAce of Hearts"+  "\nAce of Clubs" 
                      + "\nAce of Spades"};//52
  
   static String [] userDeck = new String [27];
   static String [] computerDeck = new String [27];
  </code></pre>
  
  <p>That's 52 cards. I am not sure how to get it to split tho :/</p>