console chat written in java