question: public Class < ? > compile ( String className , String code ) { try { JavaFileObject sourceFile = new StringJavaFileObject ( className , code ) ; compileClass ( sourceFile ) ; return classLoader . loadClass ( className ) ; } catch ( ClassNotFoundException e ) { throw new AssertionError ( "Failed to load newly compiled class:\n" + e . toString ( ) ) ; } catch ( IOException e ) { throw new AssertionError ( "Failed to write file:\n" + e . toString ( ) ) ; } }
target:  Compiles the class. The class must be in the default package.