2009-04-02

My April Fools Program

I meant to post this yesterday but, oldest excuse in the book, got busy. Anyway, not wanting to waste the opportunity and not willing to wait a year I'm posting it now. It is an example using a new feature of Java reflection. Here goes:
package april.fools;

public class Thp {

Thp(Object input) {
while(Class.doesHalt(this.getClass(),input));
}

public static void main(String [] args) {
try {
new Thp(Class.forName("april.fools.Thp"));
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
}
I hope you appreciate it.

1 comment:

  1. Obviously this is over my head. I'm glad to see you got started with your blog.

    ReplyDelete