Java Tic-Tac-Toe Example

Below is an example class to represent a Tic-Tac-Toe board demonstrating proper encapsulation, and Javadoc comments.

 

And here is the code for the main() game loop and additional helper functions.  Notice that there are no global variables.