What Does Foogetclassgetmethod8220dosomething8221 Null Return #1306
What does foo.getClass().getMethod(“doSomething”, null) return?
This multiple choice question (MCQ) is related to the book/course gs gs128 Java. It can also be found in gs gs128 Session Management JSP API - Java Reflection API - Quiz No.1.
What does foo.getClass().getMethod(“doSomething”, null) return?
doSomething method instance
Method is returned and we can call the method as method.invoke(foo,null);
Class object
Exception is thrown