wavePrintColumnWise
What is your doubt, please specify?
check this one i have updated it
There is just a small mistake here:
for (int i = 0; i < arr[i].length; i++)
Here you have made i<arr[i].length but you have just re-initialized āiā to 0 in the for loop and it keeps changing for every iteration. So it will give array index out of bounds exception. You can change this to :
for (int i = 0; i < arr[0].length; i++)