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
657 views
asked Guru 27.1k points 31 48 95

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 51 79

Related questions

0 votes
1 answer 32 views
32 views
asked john Guru 27.1k points 31 48 95
0 votes
1 answer 45 views
45 views
asked smith Geek 15.3k points 14 39 60
0 votes
1 answer 1.1K views
1.1K views
asked john Guru 27.1k points 31 48 95
0 votes
1 answer 29 views
29 views
asked john Guru 27.1k points 31 48 95
0 votes
1 answer 237 views
...