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); } static void hello() { System.out.println("Hello world!"); } }
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); } static void hello() { System.out.println("Hello world!"); } }
Create a free account to access the full topic