title: How do I use a String Array from another Class?
body: <p>How do I perform the perfectShuffle operation to my "deck" array?</p>
  
  <p>I do not know how to import the "deck" array into my perfectShuffle method/class (idk wtf is the difference)</p>
  
  <p>This Does NOT compile because my perfectShuffle cant find ''deck''</p>
  
  <p>I'm pretty sure you're gonna look at my code and be like 'wtf do u even know what you're doing?' well no I dont know what i'm doing but ive gotten super far with not knowing what im doing by creating a deck array of every card in a deck of cards.</p>
  
  <p>Im struggling to find the flow from class/method/object/instance watever and how they interact. </p>
  
  <p>Any help or points to resources is greatly appreciated.</p>
  
  <pre><code>public String[] Deck(){
      String[] deck = new String[52];
  
      //Populate Deck 2-10
      for (int i=0; i&lt;52; i++){
          if (i&lt;9){
              for (int j=2; j&lt;=10; j++){
                  deck[i]=(j+" of Clubs");
                  i++;
              }
          }
          if (12&lt;i&amp;&amp;i&lt;22){
              for (int j=2; j&lt;=10; j++){
                  deck[i]=(j+" of Diamonds");
                  i++;
              }
          }
          if (25&lt;i&amp;&amp;i&lt;35){
              for (int j=2; j&lt;=10; j++){
                  deck[i]=(j+" of Hearts");
                  i++;
              }
          }
          if (38&lt;i&amp;&amp;i&lt;48){
              for (int j=2; j&lt;=10; j++){
                  deck[i]=(j+" of Spades");
                  i++;
              }
          }
          else {
              deck[9]=("Jack of Clubs");
              deck[10]=("Queen of Clubs");
              deck[11]=("King of Clubs");
              deck[12]=("Ace of Clubs");
  
              deck[22]=("Jack of Diamonds");
              deck[23]=("Queen of Diamonds");
              deck[24]=("King of Diamonds");
              deck[25]=("Ace of Diamonds");
  
              deck[35]=("Jack of Hearts");
              deck[36]=("Queen of Hearts");
              deck[37]=("King of Hearts");
              deck[38]=("Ace of Hearts");
  
              deck[48]=("Jack of Spades");
              deck[49]=("Queen of Spades");
              deck[50]=("King of Spades");
              deck[51]=("Ace of Spades");
          }
      }
  }
  private void perfectShuffle(){
      Deck();
      for (int i=0; i&lt;27; i++){
          deck[i]=deck[i+26];
      }
      for (int i=0; i&lt;52; i++){
          System.out.println(deck[i]);
      }
  }
  </code></pre>