Basic calculator in java