Java tutorial
import java.io.PrintStream; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; public class MainClass { public static void main(String[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { Method m = PrintStream.class.getDeclaredMethod("println", String.class); m.invoke(System.out, "Hello, World!"); } }