I want my array to be empty after it is set, so " ". I have it set up almost right, but for some reason the first row still comes up "null". I also cannot figure out how to loop my program. I ask for input to fill element, so user will say "row 1, column 5, fill with an 'x'". I want that to store, and rerun the program until the user chooses to quit. I attempted a 'do' and 'while' loop, but it turned into an infinite loop. Any help would be much appreciated. Yes, this is homework, but I have been at it for about 8 hours and have searched and read a lot to get to where I am. Here is a link to my program, hopefully this is the best way to ask a question on here.
Don't use System.exit() to terminate your program: this should be used only in abnormal situations. The user choosing to exit the program is NOT an abnormal situation that warrants the use of System.exit().
That's a nice article from Baeldung, but I prefer not to use System.exit() full stop. Baeldung is right (he always know what he is talking about) to recommend using exceptions to deal with abnormal situations.
i'm not sure how to update my code to show the current status
Please don't update anything. Please post the new code in a new post.
Agree about not using an infinite loop. What you should do is move the "Q" option to the loop continuation predicate: ... while (!input.equalsIgnoreCase("Q")); Then the program terminates naturally. Delete lines 37‑40. By the way, I think the break; (line 41) is always executed regardless of the option you choose.