C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers

114 comments

10,705 users

What is the access scope of a protected method?

+1 vote
607 views
asked by john Guru (27,140 points)

1 Answer

0 votes
The protected method is acces accessed when we extend the protected method class.

ex:

class A{

protected void m(){

}}

class B extends A{

public static void main(String args[]){

A a = new A();

a.m();
}
}
answered by sara Guru (24,570 points)

Related questions

0 votes
1 answer 31 views
0 votes
1 answer 42 views
0 votes
1 answer 1,057 views
1,057 views asked by john Guru (27,140 points)
0 votes
1 answer 26 views
26 views asked by john Guru (27,140 points)
0 votes
1 answer 216 views
...