public class Test { public static void main(String[] args) { } } class Outer { void aMethod() { class MethodLocalInner { void bMethod() { System.out.println('Inside method-local bMethod'); } } } }
Can someone tell me how to print the message from bMethod?
You can only instantiate
MethodLocalInnerwithinaMethod. So do