File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes doubt in access modifiers... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "doubt in access modifiers..." Watch "doubt in access modifiers..." New topic

doubt in access modifiers...

Erum Momin
Ranch Hand

Joined: Jun 10, 2009
Posts: 32
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.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10815

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
I agree. Here's the link:
subject: doubt in access modifiers...
It's not a secret anymore!