Answer:
The method can be called using:
int[] returnarray = Squares();
<em>Where returnarray represents the name of the array</em>
Explanation:
To answer this, I will make an assumption that the Square method is an int array method (i.e. it returns array).
So, to call the method from main, an array has to be declared to get the values:
int[] returnarray = Squares();
Then an iteration is created to iterate through the array in order to print the array elements.
for (int i = 0; i < returnarray.length; i++)
System.out.print(returnarray[i]+ " ");
-------------------------------------------------------------------------------------------
The answer ends here
-------------------------------------------------------------------------------------------
As an addition, the complete program that includes the method and the main is:
<em>public class Main{</em>
<em> public static int [] Squares(){</em>
<em> int [] arr = new int[5]; </em>
<em> for(int i = 1;i<6;i++){</em>
<em> arr[i-1] = i*i;</em>
<em> }</em>
<em> return arr;</em>
<em> }</em>
<em> public static void main(String[] args) {</em>
<em> int[] returnarray = Squares();</em>
<em> for (int i = 0; i < returnarray.length; i++)</em>
<em> System.out.print(returnarray[i]+ " "); </em>
<em> } </em>
<em>}</em>