My sntax could be wrong since it is my 1st time doing a method.
could you advice me on what mistakes i made Many thanks!
public class methodfor2Darray
{
public static void main (String [] args)
{
int [] [] numbersone = {1,2,3,4,5}, numbertwo = {1,2,3,4,5};
TableArray(numbersone, numbertwo);
}
public static void TableArray ( int [] [] x, y)
{
for (int i = 0; i < x.length; i++)
{
for (int r = 0; r < y.length; r++)
System.out.print( x, y [i][r] + " ");
}
System.out.println();
}
}
this is the following error i get
methodfor2Darray.java:8: <identifier> expected public static void TableArray ( int [] [] x, y) ^ 1 error

New Topic/Question
Reply




MultiQuote








|