Basically, I want to do two things:
- I want to know if there is a way to run Java code using Java code.
- If possible, how can I show the output on my screen? (whether it is regular output or an error or exception)
I know this is possible because one of my seniors did it, but I don’t know how he did it. Perhaps he used one of the built-in Java classes.
Note: the user will write the code in some kind of text file, and then I will save the contents of this file in some variable, and then maybe run this code.
source
share