What does foo.getClass().getMethod(“doSomething”, null) return?
Posted: Wed Jul 13, 2022 7:50 pm
a) doSomething method instance
b) Method is returned and we can call the method as method.invoke(foo,null);
c) Class object
d) Exception is thrown
b) Method is returned and we can call the method as method.invoke(foo,null);
c) Class object
d) Exception is thrown