• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt in access modifiers...

 
Erum Momin
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
can anyone tell me what will be the result of following case?

package foo;
public class Sup{
void doit();
}

what can access the doit();
A. Any class
B. only the Sup class
C.any class in package foo
D. any class that extends Sup.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic