+ 2

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

31st Jan 2019, 1:56 PM
Mind To Machine đŸ’»đŸ•†
Mind To Machine đŸ’»đŸ•† - avatar
2 Answers
+ 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