Code is usually clearer when each expression contains at most one side
effect, as its outermost operation
What does it mean?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It means that each expression should do one task at a time.
Consider the following two declarations:
Now the task is to add these two
ints and incrementbby 1. There are two way to do it.and
JLS prefers and recommends the latter one.