Hi,
That example kind of glosses over the need to handle 3 new exceptions.
That's been my annoyance with this change.
throws InstantiationException, IllegalAccessException,
InvocationTargetException
Roger
On 6/12/2016 11:43 PM, joe darcy wrote:
On 6/12/2016 7:21 PM, Wang Weijun wrote:
Why not just clazz.getConstructor().newInstance()?
That seems to work to and is much shorter; thanks :-)
-Joe
+ * can be replaced by
+ *
+ * <pre>{@code
+ * clazz.getConstructor(new
Class<?>[0]).newInstance((Object[])null);
+ * }</pre>