Discussion Locked

Using short-circuiting operators

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Tell us what you think about the value of using short-circuiting operators, as featured in the August 12th Java e-newsletter. Have short-circuiting operators improved performance and simplified your code?

4 replies

by rsalcedo

Kevlin,

I was interested in reading the document you mentioned, but the link is not valid. Do you know where else it can be found?

-Ricardo

by bayard-generationjava

Definitely. The Null pattern is a great way to eliminate NullPointerExceptions from occuring in your code. [As described in builder.com/TechRepublic e-newsletter dated Mon, 5 Nov 2001, though I'm not aware of an archive to link you to :( ].

Simple example being, when you ask your person-loading code for a person, and the ID you ask for isn't there, it returns NullPerson and not null. NullPerson is a legal person whose name is "" etc.

Hen

This discussion is closed to new replies.