+ 3
About java designed calculator
HELLO, I'm trying to find best method of advanced calculator and I want ask you that, is it poasible to create input method without Strings and its methods, which user can write and use fast as programme can write in ide double a=(8+6*4.14) Thanks for answers
4 Antworten
+ 13
Just take input in a text box then u can use built-in JavaScriptEngineManager to eval it.
U need to import javax.script*;
Something like this:
Suppose someone enter 3+8*6 in textbox then we will get textbox value in a string.
String s = textBox.getText().toString();
ScriptEngine engine = new ScriptManager().getEngineByName("JavaScript");
System.out.println(engine.eval(s));
Hope this solves the problem
+ 8
I'm not sure what you're asking here. But i guess yes it's possible
0
I mean if you are programmer you can write in intellij idea or netbeans such that
System.out.println(3+8*6);
And answer will come instantly. But in graphic interface I thought whole day but couldn't find
0
I will try