If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

problems with Float.parseFloat()

Hi,

I am writing a pgm in which I need to calculate the total proce of all
the products selected by the user on the GUI.but then I am using IBM JDK
1.1.7 ,,,so I am getting an error with

Float.parseFloat() method, I think the method is not existing in the jdk1.1.7
API, but then I dont know how to slove the problem, I am giving the code
below for the program, could anyone have a look at it and solve my problem....

The second parameter of putValue() takes an Object. You aren't limited to
using a String there.

satish <satish_141@yahoo.com> wrote in message
news:39bcb1ce$1@news.devx.com...
>
>
>
> Hi,
>
> I am writing a pgm in which I need to calculate the total proce of all
> the products selected by the user on the GUI.but then I am using IBM JDK
> 1.1.7 ,,,so I am getting an error with
>
> Float.parseFloat() method, I think the method is not existing in the
jdk1.1.7
> API, but then I dont know how to slove the problem, I am giving the code
> below for the program, could anyone have a look at it and solve my
problem....
>
> Satish
>
> -----------------------------------------------------------------
> String totalval = "0.0" ;
> session.putValue("total.cost", (new
Float(Float.parseFloat(totalval)
> + Float.parseFloat(curprice)).toString()) );
>