What are inner class and anonymous class?

Answer

Inner class: classes that are defined within other classes.

  • The nesting is a relationship performed between two different classes.
  • An inner class can access private members and data.
  • Inner classes have clearly two benefits:
    o Name control
    o Access control.
    Anonymous class: Anonymous class is a class defined inside a method without a name.
  • It is instantiated and declared in the same method.
  • It does not have explicit constructors.

All struts2 Questions

Ask your interview questions on struts2

Write Your comment or Questions if you want the answers on struts2 from struts2 Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---