Which access level is more restrictive "protected" or "default" | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 2

Which access level is more restrictive "protected" or "default"

31st Jan 2019, 1:56 PM
Mind To Machine 💻🕆
Mind To Machine 💻🕆 - avatar
2 Respuestas
+ 2
Default is private, which is more restrictive than protected. Edit: Woops, that's not C++.
1st Feb 2019, 12:18 PM
Zen
Zen - avatar
+ 2
Zen in java default is not private, but it is more restrictive than protected in java the order of restrictiveness from most restrictive is: 1 private 2 default 3 protected 4 public
1st Feb 2019, 12:33 PM
Mind To Machine 💻🕆
Mind To Machine 💻🕆 - avatar