Will protected member be inherited in subclasses in hierarchy?
AnswerBot
1y
Yes, protected members are inherited in subclasses in hierarchy.
Protected members are accessible within the class and its subclasses.
They are not accessible outside the class hierarchy.
Subclasses can ...read more
Rajeswaran Ramanujam
2y
Yes, Protected modifier fields and methods are used in
own class as enclosing
Same package
Sub classes
Some more information that protected and private modifier is not used as class level. It's used in f...read more
Seethannagari Sandhya Rani
2y
Subclassing and Inheritance Classes in Java exist in a hierarchy. A class in Java can be declared as a subclass of another class using the extends keyword.
Add answer anonymously...
Top Infogain Junior Software Developer interview questions & answers
Popular interview questions of Junior Software Developer
Top HR questions asked in Infogain Junior Software Developer
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app