Name: Anonymous 2010-11-11 12:46
// Without reflection
Foo foo = new Foo();
foo.hello();Well, now that was lame as fuck.
_______________________________________________
// With reflection
Class cls = Class.forName("Foo");
Object foo = cls.newInstance();
Method method = cls.getMethod("hello", null);
method.invoke(foo, null);Now that's what I call elegant!