title: How to fill my array from another class?(Java)
body: <p>This is my program that makes some calculations to a numbers into the array named "initialMarks". However I would like to fill the initialMarks array from another class using scanner.Could you help me to figure it out how to do that? Is it possible to outprint the result array "result" in a third class?</p>
  
  <pre><code>public class testingN
  {
      public static void main(String[] args) 
      {
             int [] initialMarks = new int [4];
             int [] result = new int [6];
             result[0] = computedMarks(initialMarks[0], initialMarks[1])[0];
             result[1] = computedMarks(initialMarks[2], initialMarks[3])[1];
  
              for(int i=0; i&lt; result.length; i++)
                    System.out.println(result[i]);
      }
  
      public static int [] computedMarks(int mark1, int mark2) 
      {   
          int [] i= new int [6];
              for (int j = 0; j &lt; i.length; j++)
          {                   
                if ((mark1 &lt; 35 &amp;&amp; mark2 &gt; 35) || (mark1 &gt; 35 &amp;&amp; mark2 &lt; 35))
                {
                  i[j] = 35;
                }
                else
                {
                  i[j] = (mark1 * mark2);
                }
          }
          return i;
      }
  }
  </code></pre>