DEV Community

bobby.j iveson@gmail.com
bobby.j iveson@gmail.com

Posted on

Java OCP - nested classes

Hi, any Java developers... I've just got my OCA certificate and am moving onto OCP prep now... First concept, is nested classes and I'm struggling to understand how these are applied in the real world. What are some of there use cases for each type:

  • member inner classes
  • static member inner classes
  • local inner classes
  • anonymous inner classes

Thanks in advance!!

Bobby

Top comments (3)

Collapse
 
quanghm27 profile image
quanghm27

Hi Bobby,
I think this link could help you:
geeksforgeeks.org/nested-classes-j...

Collapse
 
bobbyiveson profile image
bobby.j iveson@gmail.com

Thanks mate, excellent resource!! Out of curiosity, are you a Java developer?

Collapse
 
quanghm27 profile image
quanghm27

Yes, I am. And PHP, JS also :D