What are the disadvantages of using inner classes?

Solution:

There are the following main disadvantages of using inner classes.

  • Inner classes increase the total number of classes used by the developer and therefore increases the workload of JVM since it has to perform some routine operations for those extra classes which result in slower performance.
  • IDEs provide less support to the inner classes as compare to the top level classes and therefore it annoys the developers while working with inner classes.
0 answers