What does foo.getClass().getMethod(“doSomething”, null) return?

What does foo.getClass().getMethod(“doSomething”, null) return? Correct Answer Method is returned and we can call the method as method.invoke(foo,null);

foo.getClass().getMethod() returns a method and we can call the method using method.invoke();

Related Questions

What does foo.getClass().getMethod("doSomething", null) return?
Point out the error (if any) in the following C code?
#include #include int main(void){ int* p = NULL; struct S *s = NULL; void(*f)(int, double) = NULL; char *ptr = malloc(15); if (ptr == NULL) printf("Out of memory"); free(ptr);}