`Hey,
Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries
Every method can access protected fields of its own class, and all its parent classes.Variables, methods, and constructors, which are declared protected in a superclass can be accessed only by the subclasses in other package or any class within the package of the protected members' class. Protected access gives the subclass a chance to use the helper method or variable, while preventing a nonrelated class from trying to use it.
Kindly revert for any queries
Thanks.