Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
kushalnauhwar
Posts: 17
Registered: ‎08-16-2011
My Device: 9800
My Carrier: Blackberry ApplicationDeveloper

calculate mathematical expression in blackberry java

i am talking value in textfield after that i want  to calculate the expression result

like

String str ="2*3+6/2";

 

Kushalpal Singh
Blackberry Application Developer
Please use plain text.
Developer
jitendrasharma
Posts: 208
Registered: ‎08-04-2009
My Device: Not Specified

Re: calculate mathematical expression in blackberry java

See following algo to evaluate expression:

 

http://en.wikipedia.org/wiki/Shunting-yard_algorithm

 

 

 

Please use plain text.