Vivek Singh wrote:i am not sure if this is possible as the compiler only creates a blank constructor. So you are not sure about the TYPE and Number of params in your constructor. I am not sure what you want to achive
May be varargs can be used not sure how in your problem.
Or may be
In my project , user can create manual classes from a user interface.
So we dont know how many attributes / variables the user wants to initialize.
Thats why we are trying to make a dynamic constructor of a class and invoking a dynamic method ..
I mean , I am trying to make a method like this
public void method1(String className, String methodName, String val){
//create className object using its constructor
//Dynamically call method like className.methodName(val)
}