how is that possible?
What is a class inside a class?
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
MouraCass
5 September, 16:10
Hi, Harshit
Maybe those links could help you in your searching:
https://www.geeksforgeeks.org/nested-classes-java/
https://docs.oracle.com/javase/tutorial/java/javaOO/nested.html
Is possible define a class within another class, this concept is called, nested classes.
The nested classes enable you to group classes that are only used in one place, it's kind of increases the use of Encapsulation.
I will share another link to go deeper into Encapsulation:
https://www.geeksforgeeks.org/encapsulation-in-java/
Best Regards
0