Java chat program to test an idea