Hi
I am getting the values of price from Databse and Stored in resultset.
From resultset i put the values in ArrayList.
Now i want to display the value in ###.00 format.
For example if the price is 40 , it has to be displayed as 40.00 and if the price is 50.5, it has to be dispalyed as 50.50.
I am using a NumberFormat class.but not getting the proper results.
The following is my code:
String total=(String)sum1.get(i);
NumberFormat nf = NumberFormat.getNumberInstance(Locale.ENGLISH);
out.println("$" +nf.parse(nf.format(total)))
sum1 is a arraylist.
What is wrong in this code?
Please help me to do this
thanks
selvi