how to take character input from user in java