Reflection invocation

Report a typo

What will be the result of the following method invocation:


public class Main {

    public static void main(String[] args) throws Exception {
        Main.class.getMethod("hello").invoke(null);
    }

    public static void hello() {
        System.out.println("Hello world!");
    }

}
Select one option from the list
___

Create a free account to access the full topic