loading...

re: Better Null-Checking in Java VIEW POST

TOP OF THREAD FULL DISCUSSION
re: No, you didn’t. You can do it exactly as in your first example.

I confirm, the first example works.

But besidd that, this goes against rule of Demeter.

You should not have to access so many indirect attributes to get the zip code. User should expose a getZipCode method.

code of conduct - report abuse