This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Interface Implementation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Interface Implementation" Watch "Interface Implementation" New topic
Author

Interface Implementation

phanikumar denduluri
Greenhorn

Joined: Sep 04, 2003
Posts: 1
Can an interfaec be implemented outside a package. This is because we cannot specify access modifier to an interface. please answer my question
M Sharma
Ranch Hand

Joined: Dec 13, 2001
Posts: 106
Hi phanikumar,
I think we can specify an access modifier for an interface.
Only public and default access modifier are allowed for an interface.
If you wish to access the interface outside the package declare it as public interface and if you do not wish to access interface outside the package then do not specify any modifier (default) while declaring it. default access modifier will only make it available to the current package.


Regards, Manish
SCJP 1.4
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
I agree with Manish.
Regards
Maulin
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Interface Implementation
 
Similar Threads
How To Call Two Different Classes From the Main Program Using the Same API?
Home interface or Home Interface stub
Time Capsule
Writing an Interface
Regarding Interfaces