struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apurva Goswami" <agosw...@arnoldtraveltechnology.com>
Subject RE: Help : execute a equation in String format
Date Tue, 04 Jan 2005 06:28:43 GMT
Hi Sachin,

You can use java.math class to achieve what you want.
To be precise you can java.math.BigDecimal and then convert your result
into string object.

Hope this helps.

Cheers
Apurva



-----Original Message-----
From: sachin [mailto:sachin.hegde@paradyne.co.in] 
Sent: Tuesday, January 04, 2005 5:34 PM
To: Struts Users Mailing List
Subject: Help : execute a equation in String format

hi , 

I have equation in String format
like 

String equ = "((123*123+567-7899*340)/1234)*1000";

now i want to execute this equation and get the result ..
How can i achieve this in java ?

note : This is not a struts -related issue ... yet i need help so i
posted ..
hope nobody minds much ....

Regards,
Sachin Hegde
Software Developer
Paradyne Infotech Limited , Mumbai
09324546711

"There are three kinds of lies: lies, damn lies, and statistics."
-Benjamin Disraeli



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message