Home | History | Annotate | Download | only in differentiate_dot_expressions
      1 public class InnerClassDotExpressions {
      2     public static void main(String[] args) {
      3         InnerClassContainer.InnerClass.methodCall();
      4         InnerClassContainer.InnerClass.InnerInnerClass.innerMethodCall();
      5         InnerClassContainer.InnerClass.InnerInnerClass.InnerInnerInnerClass.innerInnerMethodCall();
      6     }
      7 }
      8 
      9 class InnerClassContainer {
     10     class InnerClass {
     11         public static String methodCall() {
     12             return "CalledMethod";
     13         }
     14         class InnerInnerClass {
     15             public static String innerMethodCall() {
     16                 return "CalledInnerInnerClass";
     17             }
     18             class InnerInnerInnerClass {
     19                 public static String innerInnerMethodCall() {
     20                     return "CalledInnerInnerInnerClass";
     21                 }
     22             }
     23         }
     24     }
     25 }
     26