// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.lang.reflect.*;

public class Dynno {
    public Dynno() {
    }
    public String dup(String s) {
        return (s + s);
    }
    public static void main(String[] args) throws Exception {
        Object o = Class.forName("Dynno").newInstance();
        Class declarg[] = new Class[1];
        declarg[0] = String.class;
        Method m = o.getClass().getMethod("dup", declarg);
        Object callarg[] = new Object[1];
        callarg[0] = "abc";
        String res = (String) m.invoke(o, callarg);
        System.out.println(res);
    }
}
