Help you in doing your homework? Thank you, but no!
We don't do homework for a reason. Think about it, and imagine why...
And you could have done some basic research. Do you know google
]? My advice is: try it out, awesome!
Either way, sometimes it is not so bad idea to learn by trying to understand other people's work. So I suggest you should start here: http://forum.codecall.net/topic/36472-javatutorial-tic-tac-toe/#axzz2IcOKXwYs