What is the difference between static nested class and Java inner class?

1) First and most important difference between Inner class and nested static class is that Inner class require instance of outer class for initialization and they are always associated with instance of enclosing class. On the other hand nested static class is not associated with any instance of enclosing class.24 Ağu 2021

Sizin İçin Seçtik  What are inner classes and what are the types?

Leave a Reply

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