I have a method that returns an integer. I am testing this integer value for null, if null I return 0 (zero). I do not want 0 to be displayed instead a blank/empty string. How do I do this? <%= monthlyPaymentPlan.getInstallmentCount() > 0 ?monthlyPaymentPlan.getInstallmentCount() : 0 %> Thank you.
Melinda If I understand you correctly then you can't return an empty string from a method that is declared to return an int. You could just test it after it is returned and then display the appropriate repsonse or change the method to return a string and if you have an int value then use toString to change it to a string value to be returned. If I didn't understand your question let me know
------------------ Dave Sun Certified Programmer for the Java� 2 Platform
Joined: Jul 05, 2001
The rest of my post didn't get posted here is the method: monthlyPaymentPlan.getInstallmentCount() > 0 ? monthlyPaymentPlan.getInstallmentCount() : 0 Lets see if the toString will do it. Thanks.