2006/3/27, Magnusson, Geir <[EMAIL PROTECTED]>:
> Did you catch it?

yes i did:

public class test3 {
    static int i;
    static Exception e = new Exception("");

    public static void main(String[] args) {
        for( int i = 0; i < 5000000; i++ ) {
            try {
                a();
            } catch (Exception e) {
            }
        }
    }

    static void a() throws Exception {
        i++;
        throw e;
    }
}

I've also tried to store it:

        for( int i = 0; i < 5000000; i++ ) {
            try {
                a();
            } catch (Exception e) {
                e1 = e;
            }
        }

The time is almost the same.

Thanks,
Mikhail

Reply via email to