View RSS Feed

Java Object

Object-oriented programming in Java.

  1. Why Use Nested Classes?

    by , 04-26-2012 at 04:57 PM
    Many compelling reasons are present to use the nested classes. Among them:

    • Grouping of classes is done logically which are just used at 1 place.
    • Encapsulation is increased
    • Nested classes might be leading to more maintainable & readable code.



    Logical classes groupings—When one class is useful towards just 1 class, it would be so logical to do its embedding in that particular class so that to keep them together. They are known as the helper classes ...