Provide an example and explanation of an inner class in Java i need an real example where it going to use

55 views Asked by At

please dont send link please give me programming example where Inner class going to use and why we should use inner class

1

There are 1 answers

0
Kristjan Veskimäe On

You can be more OOP by extracting some functionality out into its own class. Java GUI programming with Swing uses inner classes extensively, so you have the functionality separated out but still located together in the same place in the same class.