When should I use inner class in Java?

Use a non-static nested class (or inner class) if you require access to an enclosing instance’s non-public fields and methods . Use a static nested class if you don’t require this access.

Sizin İçin Seçtik  What means nested class?

Leave a Reply

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