Reputation: 4404
Lets say i want to dynamically load a class in java and call it's start()
(has no params) method:
Class<?> c = Class.forName("AbuseMe");
c.getMethod("start").invoke(c.newInstance());
Would this be a good/safe way to do it?
Upvotes: 5
Views: 13345