RESULT ERROR WHILE USING 'FOR' LOOP

Kindly explain what is going wrong in my program as there is an extra line being printed, or, is there anything else that is also wrong in the logic of my code.

you are printing 1 extra star in every line due to the seperate printing of the star in
System.out.println(* )
omit this line and add one new line after the 2nd for loop
here is your corrected code:

please always share your code after saving it on ide.codingblocks.com

if this solves your doubt please mark it as resolved :slight_smile: