title: Storing int[] data from one file, to a file containing main method
body: <p>I've spent the last 3 hours looking at Stack forums that had the same questions but way more complicated examples...</p>
  
  <p>This code is for a small part of a big project. It's sort of a DnD type game, such that your stats for many different aspects of your character affects how the game flows/situations you can encounter. </p>
  
  <p>Goals aside, for now I just want to put all the player data into <em>individual</em> classes, within a file, and be able to retrieve/store pieces of said data(<strong>in a separate file with main method</strong>) into temp variables for further use.</p>
  
  <hr>
  
  <p>This code is exact, done by the user "Xynariz."
       //   Throughout all the research I did, this got me the closest to what I wanted.][1]</p>
  
  <pre><code>public class Driver{
      public static void Main(String[] args){
  
          int[] array = {1, 2, 3}; 
          CustomObject otherObject = new CustomObject(array);
  
      }
  }
  
  /// And, in a different file....
  
  public class CustomObject{
      public CustomObject(int[] array){
         int x = array[2];
         //etc...
      }
  }
  </code></pre>
  
  <hr>
  
  <p>This is Game.java with the main method. Trying to get the array data in here from file.java</p>
  
  <pre><code>import java.util.Arrays;
  
  public class Game {
      public static void main(String[] args, int[] str) {
  
          int x = str[1];
          int[] y = str;
  
          System.out.println(x);
          System.out.println(y);
  
  
      }
  
  }
  </code></pre>
  
  <hr>
  
  <pre><code>public class file {
  
  
  
  public static void enemy_1(String[] args, int[] var){
  
  
                  //{health, stamina, magika, speed};
      int[] stats = {50    , 3      , 0     , 2    };
  
                //{strength, athletics };  
      int[] str = {3       , 5         };
  
              //  {acrobatics, sleight_of_hand, stealth};  
      int[] dex = {8         , 2              , 1      };
  
                //  {arcana, history, investigation, nature};  
      int[] intel = {0     , 0      , 0            , 5     };
  
              //  {animal_handling, insight, medicine, perception, survival};  
      int[] wis = {4              , 1      , 0       , 4         , 6       };
  
                 //  {deception, intimidation, performance, persuasion};  
      int[] charis = {0        , 0           , 0          , 0         };
  
      Game object = new Game(str);
  
  }
  
  
  public void player_1(String[] args, int[] var){
      // rogue character 
  
                  //{health, stamina, magika, speed};
      int[] stats = {70    , 7     , 0    , 9    };
  
            //and so on... 
  
  
       }
      //list of entities would continue.
  }
  </code></pre>
  
  <hr>
  
  <p>I was able to store player data into temp variables to then run through methods, <strong>BUT</strong>, it only worked when the player data was in the class main file, and temp vars stored into the secondary file. (I have to have the temp var stored from the secondary -> the primary file so i can have those var run with further methods in the main).</p>