Difference between protected and private protected .
what is difference between protected and private protected access modifiers.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
DarilPosted Nov 23, 2021, 5:37 AM
Now let's see an example.
We have two variables in class Floor pri and pro.
The pri is declared private and the pro is declared protected.
The pri cannot be accessed in the class A. But the pro can be accessed in class B. Because to access the protected, it must be in the same assembly. The private can only be accessed by the functions inside the same class..
Puneet KankarPosted Nov 16, 2019, 10:43 AM
Mageshwaran RPosted Nov 15, 2019, 5:38 AM
Jaish MathewsPosted Sep 13, 2018, 12:55 AM
Jignesh KumarPosted Sep 13, 2018, 12:53 AM
Pravesh KumarPosted Sep 13, 2018, 12:42 AM
Jignesh KumarPosted Sep 13, 2018, 12:35 AM