3 ms·
That's not the same since you are executing the bar method multiple times.
by guelo 17y ago
That's not the same since you are executing the bar method multiple times.
- sukuriant 17y agoIf you really want to get picky, return foo.bar().baz().qux() * 2; Could become: Bar bar = foo.bar(); if(bar == null) handleBarNull(); else { Baz baz = bar.baz(); if(baz == null) handleBazNull(); else { //(assuming qux is a value) return baz.qux() * 2; } }