Karen Guffey wrote:
Calling the printArray method with the values 9,8,7 just prints "9 8 7".
What this line does?It creates an array of length 6 and initializes it, and then passes as an argument to a method. Array itself holds elements 3, 1, 2, 6, 4, 2.
What do you want to do later with them within the method it is your choise.
It can. But probably you don't want that, as you likely want to pass an array with elements entered by user (line 11).Karen Guffey wrote:So that statement could not be used to call a method called printArray?
Yes. But NetBeans should be able to sort out the indentation automatically. On Eclipse you can use ctrl‑A…ctrl‑I and it will indent the whole class. There must be a similar option on NetBeans.Karen Guffey wrote:Campbell: Can I use a text editor with an IDE? We use Netbeans for class. If not, could I copy my program from Netbeans into the text editor for indentation? . . .!!!
arrayTpPrint is the name of the parameter. You pass an array which can be any sort of array of the right type and the method will accept it.Karen Guffey wrote:One question before I can proceed: where do you create arrayToPrint?
Do you play tennis?Karen Guffey wrote:. . .
Back to Campbell: the whole "new" thing when I'm working with an array I've already created bothered me. But the textbook said...!!!