// 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.Constructor;

public class ReflectionFun2 {
    public static void main(String[] args) throws Exception {
        System.out.println(OnlyOne.ME.hashCode());
        OnlyOne o = OnlyOne.ME;
        System.out.println(o.hashCode());
        Constructor<?> ctor = o.getClass().getDeclaredConstructors()[0];
        ctor.setAccessible(true);
        // still throws Exception
        Object o2 = ctor.newInstance();
        System.out.println(o2.hashCode());
    }
}

enum OnlyOne { ME }
