SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Joanne
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ilja Preuss:
[QB]And here is a streamlined version that is as fast, and - in my opinion - easier to read:
Hey Ilja,
Great minds think alike -- go back and look at my post in this thread
Originally posted by Ilja Preuss:
And here is a streamlined version that is as fast, and - in my opinion - easier to read:
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
or I'd say "Hey, there's no reason why null shouldn't have square brackets, too, and write
public String toString()
{
return " xxx: [" + getXXX() + "]\n";
}
Originally posted by Rob Prime:
Actually, that code could be very very inefficient, if getXXX() takes a long time to return a result and that result is not null. After all, you are calling the method twice! Calling it once, then storing the result in a local variable would be a lot better.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Adam Schaible:
Why are people obsessed with the ternary operator? The JVM/Compiler will optimize most of that, and I'd say the majority of us write in a CORBA - is that half of a nano-second really worth the anomaly?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ernest Friedman-Hill:
Hey Ilja,
Great minds think alike -- go back and look at my post in this thread![]()
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
No one can make you feel inferior without your consent - Eleanor Roosevelt. tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|