A class BaseClass { BaseClass() { } public class NestedClass { NestedClass() { } } } public class MainClass { public static void main(String[] argv) { BaseClass.NestedClass nbc = new BaseClass().new NestedClass(); System.out.println(); } }