What is the use of protected keyword in Java?

Harper Lee | 2023-05-05 12:30:26 | page views:1743
I'll answer
Earn 20 gold coins for an accepted answer.20 Earn 20 gold coins for an accepted answer.
40more

Liam Turner

Works at Tesla, Lives in San Francisco. Graduated from University of California, Berkeley with a degree in Mechanical Engineering.
The protected keyword is an access modifier for method and variable of a class. When a method or a variable is marked as protected, it can be accessed from: Within the enclosing class. Other classes in the same package as the enclosing class.
2023-05-10 12:30:26

Benjamin Davis

QuesHub.com delivers expert answers and knowledge to you.
The protected keyword is an access modifier for method and variable of a class. When a method or a variable is marked as protected, it can be accessed from: Within the enclosing class. Other classes in the same package as the enclosing class.
ask:3,asku:1,askr:137,askz:21,askd:152,RedisW:0askR:3,askD:0 mz:hit,askU:0,askT:0askA:4