search
Login

Categories


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

3.8k questions

4k answers

117 comments

10.7k users

1 vote
669 views
asked Guru 27.1k points 31 50 97

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 Guru 24.6k points 29 52 81

Related questions

0 votes
1 answer 32 views
32 views
asked john Guru 27.1k points 31 50 97
0 votes
1 answer 45 views
45 views
asked smith Geek 15.3k points 16 41 63
0 votes
1 answer 1.1K views
1.1K views
asked john Guru 27.1k points 31 50 97
0 votes
1 answer 29 views
29 views
asked john Guru 27.1k points 31 50 97
0 votes
1 answer 251 views
...