Thursday 26 May 2016

Replacing ... With Boolean Expression

I found my IDE (IntelliJ) mentioning casually to me that I should replace this:
return municipality != null ? countSupply(municipality) > 0 : false;
With this:
return municipality != null && countSupply(municipality) > 0;

Trivial, I know, but most impressive of the IDE to catch that.

In the mean time, I'll patiently wait for the next version of the IDE that can actually do my programming for me.

Until that day, I'd better get back to work.

1 comment:

  1. Nice blog. Keep posting on Java Programming. Try to make good menu system. It is good for easy navigation and easy understand of concepts...

    ReplyDelete