Initializing a class with Class.forName() and which have a constructor which takes arguments

I am instantiating a class like this.

myObj = (myObj) Class.forName("fully qualified class name here").newInstance();

My doubt here is if we have a constructor which takes arguments how can we instantiate it like above one.

Thanks,
Narendra

26
задан jruizaranguren 27 October 2015 в 07:38
поделиться