I recently completed this program assignment for my beginning java class and it works well. I passed the assignment all right but was wondering if there is anything I can do to cleanup the code? Some of it seems wordy, particularly the comparisons for a winner at the bottom lines 146 - 158. thanks
The first thing I would do to clean this up would be to move the major data structures (e.g., "board") from being local variables to member variables, and then start breaking the one long method up into a number of much smaller, single-purpose routines. As a start, consider that every where you've written a comment like "initialize board", you could instead have a call to a method named "initializeBoard()" which did just that one thing. Sometimes these methods would operate on shared data like "board", while other times they'd communicate with main() using arguments and return values.
Once the code is broken into these small chunks, then you can consider which ones need the most work to make them easy to understand.
Clean code is a particularly subjective phrase, however looking at what you have, the first thing I would advise would be to decompose your singel main method into smaller methods. These methods should do exactly one thing, and return a result. If you start down that road, your main method might begin to look something like this:
Once you start decomposing your program into smaller units, you usually end up with methods that are smaller, and easier to understand (and test).
Edit: Ernest beat me to the punch!
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter