I have following code:
String tmpTotalCost = "";
tmpTotalCost = request.getParameter("TotalCost");
if(tmpTotalCost == null)
tmpTotalCost = "";
if(tmpTotalCost == "")
tmpTotalCost = "0.00";
What would be the best way to check if tmpTotalCost
is null or empty?
I would always write a code that would finish the job, but I never thought about performance.