Question: public static char [ ] [ ] getSquares ( int rows, int columns ) { char [ ] [ ] square = new char [

public static char[][] getSquares(int rows, int columns){
char[][] square = new char[rows *2][columns *3];
for (int i =0; i < rows *2; i++){
for (int j =0; j < columns *3; j++){
if (i ==0 && (i %2==0 && j %3==1)){
square[i][j]='_';
} else if (i %2==1 && j %3==1){
square[i][j]='_';
} else if (i %2==1 && j %3==0){
square[i][j]='|';
} else if (i %2==1 && j %3==2){
square[i][j]='|';
} else {
square[i][j]='';
}
}
}
return square;
} modify this method a bit so that it works the exact same but isnt the same as the mehtod provodied

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!