int total=Integer.parseInt(price);
String stotal=(String)(total+total)
----- Original Message -----
From: "Brandon Ng" <nodnarb_33@y...>
To: "Pro_JavaServer_Pages" <pro_jsp@p...>
Sent: Monday, August 13, 2001 7:41 PM
Subject: [pro_jsp] convert string to integer
> how do i convert a string which i retrieve from database to int for
> mathematics calculation?
>
> String price = hoteldata.getString(1);
> String total = price + price;
>
> how do i change price into int so that i can calculate total?
> and what should the type cast be for total?
>
>