[SOLVED] Instantiating a particular class constructor using reflection

There’s a small bug in your posterity solution: :sweat:

B/c variable innerCls isn’t initialized right way, that’ll never happen if the try {} fails! :fearful:

You can replace System.err.println(ex); w/ throw new RuntimeException(ex); inside the catch () {} block in order to override that. :bulb:

1 Like