This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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: 10744

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Have you checked out Aspose?
subject: doubt in access modifiers...
It's not a secret anymore!