Sasha, I tried your example. This is how it works: File: In.java package abc; public class In { In() { System.out.println("instantiating outer In class"); } public static void main(String[] args ){ Out o = new Out(); o.method(); } } File: Out.java package abc; class Out { void method(){ abc.In i = new abc.In();//instantiating outer In class In in = new In(); ...
Hi, If I have an inner class named MyInnerClass which resides in a class named MyOuterClass, then name of the .class file for the inner class is MyOuterClass$MyInnerClass.class. Is the class file name guaranteed to be $.class on all platforms for all Java versions? Are there any exceptions to this naming convention? Regards, Amit