public class InnerClass {
  public static void main(String[] args) {
    A a1 = new A();
    Class c1 = (a1.new B()).getClass(); // wierd syntax by the way
    System.out.println(c1); // prints A$B
    
    A a2 = new A();
    Class c2 = (a2.new B()).getClass();
    System.out.println(c2); // prints A$B
   
    // types are equal? yes
    System.out.println(c1.equals(c2));

    // how to refer to the type of this expression? A$B doesn't work
    a2.new B();
  }
}

class A {
  public class B {
  }
  public static class C {
  }
}
