I\'m trying to achieve some sort of reflection in java. I have:
class P { double t(double x) { return x*x; } double f(String name, double x) { Me
invoke() method returns the object which is returned after that method execution! so you can try...
invoke()
Double dd = (Double)method.invoke(this,x); double retunedVal = dd.doubleValue();