-
help w/ method calling
Hey, does anyone know how to fix my code?
I have errors on System.out.println ("Array before reversal: " + (AU.display(mainArray)));
and
AU.reverse(int[] mainArray);
and
Code:
//b. Displays the values of the array using the display() method (which you must write).
System.out.println ("Array before reversal: " + (AU.display(mainArray)));
//c. Reverses the values in the array using the reverse() method (which you must write).
AU.reverse(int[] mainArray);
System.out.println ("Array being reversed . . .");
-
It says for the 1st problem that:
- The static method display(int[]) from the type ArrayUtilities should be accessed in a
static way
what does it mean to be accessed in a static way?
My teacher made us make all our methods static by the way, so these are accessing static methods
-
Accessed through the class name only rather than through a variable of an instance object created through the new operator.