PrasannaKumar Sathiyanantham wrote:
My doubt is points variable of enum suite is private. So when I access it directly in the line 13, Why does it not throw any error ?
Enum has been defined inside the class,now it has become the part of the class(you can say another member),so it can access all the members of the class,no matter they are private.
If enum was defined outside the class bridge it will give you the error.
Output: 5
Similar thing you can see in inner class case.