I have a method which returns [2] array, each value returned are doubles:
public class additions;
{
public double [] Number ()
double [] z;
z = new double [2]
z[0]= 12+5;
z[1]= 58-8;
return z;// I would assumed values returned are stored in "Number";
}
Then in the main class, I have
additions calculus_1 = new additions();
System.out.print(Arrays.deepToString());//neither of them seems to be working
System.out.print([0].Stringform());
System.out.print(calculus_1.Number());
I am unable to print the answer, Can you use a loop? where should I printing out the answer in the main class?
I am looking for a dynamic since I would be changing the calculation for Z.