The method getConstructor(Class<?>... parameterTypes)
you mention belongs to the Reflection Framework. While reflection does have its merits and is sometimes the only way to solve a problem, you should avoid it, unless you have a good reason.
It is hard and tedious to get code right using reflection as the compiler can't detect most errors. For general use it's just a code smell.
The usual way to initialize a class is to just call the respective constructor directly, as @Ralf Kleberhoff describes: MyClass instance = new MyClass(stringParam, intParam, doubleParam, booleanParam);
.
If most of the parameters are optional, you usually only pass the required parameters to the constructor. This avoids an abundance of different constructors (to be tested and documented). The constructor usually sets the optional parameters to reasonable default values. These optional parameters are then set using setters if they are available.
As you don't really describe, what you want to achieve (instead of your current problem), we can only guess...
My guess would be that you try to parse parameters the user passes to your program on the command line and want to configure your class accordingly.
My Answer to that would just be: Don't write that code! There are many good libraries out there. These are tested and offer many goodies and examples. If you insist on reinventing the wheel, these are a good starting point to see how this could be done.