Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

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

+1 vote
698 views
asked by (27.1k points) 31 53 112

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 (24.6k points) 31 55 94

Related questions

0 votes
1 answer 32 views
32 views asked by john (27.1k points) 31 53 112
0 votes
1 answer 47 views
47 views asked by smith (15.3k points) 18 45 77
0 votes
1 answer 1.1k views
1.1k views asked by john (27.1k points) 31 53 112
0 votes
1 answer 30 views
30 views asked by john (27.1k points) 31 53 112
0 votes
1 answer 43 views
...