Can inner classes have constructors?

You can observe the constructor chain for the inner class when you extend an inner class . so you can see that you are able to call the super constructor of your nested class passing to that constructor the MainClass , and calling . super on mainClass object instance.

Sizin İçin Seçtik  Is it good to use inner class in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *