I\'m somehow new to Java so my question can seem trivial, however i cannot find an answer to it anywhere in my books.
I want to initiatie a dialog with a user in which h
How to convert a String into Arithmetic Expression
import bsh.*;
class Operation
{
public static void main(String[] args)throws Exception
{
Interpreter i=new Interpreter();
int r=(Integer)i.eval(args[0]);
System.out.println(r);
}
}
for this we need a separate jar file named: bsh.jar file
need to set classpath for above jar file
source: http://ohmjavaclasses.blogspot.com/2011/11/how-to-convert-string-into-arithmetic.html