0

What is a practical use of an inner class?

21st Aug 2016, 11:44 PM
Thomas Shrader
Thomas Shrader - avatar
2 Respuestas
0
I think usually some kind of helper or event handling class. You might have to do some practical tutorials on a subject to see some useful examples.
24th Aug 2016, 2:21 PM
Frostbyte
0
encapsulation. if you have a computer class with several private nested classes (ie. processor, ram, soundCard etc) then only the computer class needs to use/see the nested ones. your car class probably doesn't need to see the soundCard class.
25th Aug 2016, 8:41 PM
Brandon Beauchene
Brandon Beauchene - avatar