Simple calculator in Java