I am working on my final project in my OOP1 class. The language is java.
I'd like to know how I invoke the following method inside my constructor:
public Garden (int size) {
garden=new char[size][size];
this.initializeGarden(garden[][]);
}
private void intializeGarden(char [][]garden) {
for(int i=0;i<garden.length;i++)
for(int j =0;j<garden.length;j++)
garden[i][j]='-';
}
this.initializeGarden(garden[][]); is one of several failed attempts. I've tried a few variations, and eclipse didn't like any of them.