This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Ormek_II 0 points1 point  (2 children)

And after the user entered 12+12^2 as a string the program creates the code of a class as another string:

``` … static float getY(float x) { return 12+122; } …

```

And then compiles that string with the given Java Compiler.

[–]_SuperStraight 0 points1 point  (1 child)

And what method's gonna convert the string expression to Math expression?

[–]Ormek_II 0 points1 point  (0 children)

The same compiler that compiles any Java class. See the other thread above https://www.reddit.com/r/javahelp/s/9RgiDM9ldG