public class JavaOne{ public static void main(String[] args){ Outer.Inner.fun(); Outer.Inner in=new Outer.Inner(); in.fun(); Outer ou=new Outer(); ou.f(); } } class Outer{ static int a=10; static class Inner{ public static void fun(){ System.out.println(a); } } public void f(){ Inner i=new Inner(); i.fun(); } }