title: Can I convert a string to a java code
body: <p>So I made a previous post on how to compile and run a java file
  But I came to a conclusion of a better idea:-
  for example I have this java code</p>
  
  <pre><code>public class Main {
  public static void main(String[] args){
      String test = 123;
      Scanner s = new Scanner(System.in);
      String code = s.nextLine();
      // Code Here
  }
  </code></pre>
  
  <p>So I want the code to work like this if what I type in my String (code) is <code>System.out.println(test + " 123");</code>
  it prints out 
  <code>(123 123)</code>
  So what is the code that I should replace in // Code Here
  Please make sure that all the variables and libraries in this project are compiled within the code, and please make the answer simple please, the javacompiler class explanation in oracle is kind of hard to comprehend because can you please post an answer in here!</p>