Okay, this page includes a "limited functionality" example of a chat server. The server exists and accepts multiple connections (i.e. threads work) but that's pretty much all the server code that is provided. There are various other useful bits and pieces and if you haven't started yet this code might be a good place to begin.
Note though, that like all skeleton code it is not straightforward to understand - you may end up spending more time trying to decipher how (and why) I've done certain things than you actually would if you wrote it from scratch.
Anyway, I'm sure it will be useful to almost everyone.
There are seven java files to download and if you put them all in the same directory, you should be able to compile them all. Once compiled, running java ChatServer 20000 will start the chat server running on port 20000 (or whatever port you specify). Similarly, java ChatFrame hostname 20000 will run the client program with whatever hostname (localhost if you want to run on the local machine) and port number you specify.
If you plan to re-use any of this code, then make sure you comment every line properly (forcing you to have to understand it) and make sure that you're not including unnecessary code just "because it was in the example". It will cost you marks if you don't stick to this.
The files to download are:
Good luck!