I'm trying to take a string, passed as an argument, and evaluate it as a boolean expression in an if conditional statement. For example, the user invokes MyProgram like $ java MyProgram x==y
.
Example Program
Defined variables:
int x;
int y;
Boolean expression argument:
String stringToEval = args[0];
Control program execution with user expression:
if (stringToEval) {
...
}