Hacker News new | ask | show | jobs
by vlisivka 5970 days ago

  Class c = SomeRandomClass.class;
  Object x=c.newInstance();
1 comments

Yes, but that's making use of runtime magic (the Class class) which isn't used outside metaprogramming.