// InnerClass Example // Source code file: Main.java // Class A and class B are ordinary classes that can access each other's objects. // This is the Main class for testing the A and B classes. public class Main { public static void main(String[ ] args) { A a = new A( ); B b = new B( ); System.out.println(a); System.out.println(b); a.accessB( ); b.accessA( ); } }