I am a new fish in Android development. While reading books and Android source code I found out that there so many inner classes in the Android application. Why does Android need so many inner classes?
I am confused by these inner classes.
They are often the most efficient way of implementing a design.
An inner class can access the private members of the class which contains it, so using an inner class allows a split of functionality between classes without the need to add accessor methods for private variables.
Inner classes are not just in Android
. I guess you need to understand why they are good in some cases.
Check this article about Inner classes: Inner classes: So what are inner classes good for anyway?.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With