IN main class can’t call the sub class [closed]

Replace

Super.Sub rr = new Super.Sub();

with

Super.Sub rr = new Super().new Sub();

or declare Sub as static class.

Check this to learn more about it.

Leave a Comment