Is there a java equivalent of the python eval function?
This would be a function which takes an arbitrary string and attempts to execute it in the current context.>
It's not that simple in Java. Java is a compiled language and in order to "eval" some code, it needs to be compiled. Python is interpreted and thus "eval" is much simpler.