This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
since .getPArameter doesnt put "" if the parameter is not found
Yes. if parameter returns null then you will be end up with an exception.
so you can do this since equals method dont throw exception if the argument is null, instead it returns false.
or
I always use later idiom. because some times you need to invoke a method on string_
Seetharaman's version is fine. It's a very common idiom. The point of using if(string_ != null && !string_.equals("")) is that the expression "short-circuits". If the first part is false it doesn't bother calculating the second part. So you can be sure that if it reaches the second part string_ is definitely not null.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.