SCJP
SCJP 5.0
SCJP
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
SCJP
Originally posted by Preeti Yarla:
But what if the requirement is only one small condition, like (temperature >= -273) ? Wouldn't it be efficient to write the code than to call a function since calling the function involves some overhead?
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
SCJP
Always make "fast code" your bottom priority. Write correct code, simple code, maintainable code, stylish code (meaning conforming to your style guide) and the compiler will do all the optimising you need. Read this interview with Brian Goetz.Originally posted by Preeti Yarla:
I usually try to put each specific functionality into a different method but sometimes I am not sure how to choose between code reuse and efficiency.
SCJP
You're welcomeOriginally posted by Preeti Yarla:
OK.
Thanks again, Garrett and Campbell!
Don't get me started about those stupid light bulbs. |