Java inner class or nested class is a class which is declared inside the class or interface, It improves the encapsulations. So objects know about the other objects that they need to know. If you don’t want to access the any class without the accessing the outer class Inner classes works well in this scenario.

Two special cases of Inner Classes:

  1. Local classes
  2. Anonymous classes

Local Classes:

--

--

komal dongare

komal dongare

Problem Solver, Programmer, Blockchain developer, and a guitarist. New and innovative ideas are always welcomed.