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
571 views
asked Dec 15, 2013 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 Aug 9, 2014 by sara Guru (24,570 points)

Related questions

0 votes
1 answer 30 views
30 views asked Dec 18, 2013 by john Guru (27,140 points)
0 votes
1 answer 42 views
42 views asked Jan 10, 2014 by smith Geek (15,340 points)
0 votes
1 answer 1,057 views
1,057 views asked Dec 17, 2013 by john Guru (27,140 points)
0 votes
1 answer 25 views
25 views asked Dec 15, 2013 by john Guru (27,140 points)
0 votes
1 answer 210 views
...