Samples JDK
B.java
1 package com.freemindcafe.oops.innerclass.mypackage;
2 
3 /*
4  *
5  */
6 public class B {
7 
8  public static void main(String[] args) {
9  //A can be accessed
10  A a = new A();
11 
12  //B can not be accessed
13  //A.B b = new A.B();
14 
15  //C can be accessed
16  //Since it is not static, it can only be accessed within A's closure
17  A.C c = new A().new C();
18 
19  //D can be accessed
20  A.D d = new A.D();
21 
22  }
23 
24 }