Page 31 - Object & Class
P. 31

Inner Class











             •        In Java, it is also possible to nest classes (a class




                      within a class). The purpose of nested classes is to




                      group classes that belong together, which makes




                      your code more readable and maintainable.





             •        To access the inner class, create an object of the



                      outer class, and then create an object of the inner




                      class:
   26   27   28   29   30   31   32   33   34   35