File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

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: 9990
    
    7

http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doubt in access modifiers...
 
Similar Threads
static inner class question.
Question about the Thread / Synchronization --- SCJP mock Exam
Assertions
finalize() method
IllegalAccessError and Classloaders.