I want to create an instance of Item.class. It takes two objects as constructor parameters.
First FirstObject = new First();
Second SecondObject = new Second();
Class[] constructorArgs = new Class[]{First.class,Second.class};
Item.class.getConstructor(constructorArgs).newInstance(FirstObject, SecondObject);
this doesn't seem to work. I get a compiler error that says:
unhandled exception Java.Lang.NoSuchMethodException
How to fix?