J
James D Carroll
I posted this previously:
*****
Could someone explain this:
interface myInterface{
void foo();
}
then...
class myClass implements myInterface{
void foo(){
'do this
}
}
I want the Interface, its methods, and the implementing class and its
methods to have "package" level permissions. But I get the complier error:
attempting to assign weaker access privileges; was public
Could someone explain this (or provide a link that does) ?
Thanks
****
I got a one answer that mentioned that when it comes to interfaces they are
automatically public and abstract. The abstract aspect I accept.
But isn't there a way to create an interface that can only be implemented by
classes in the same package? Or more genereally a way to restrict who can
implement my interfaces? Separately, could an abstract base class be
declared with "package" level permissions to achieve the same goal (though I
don't care for that, I's do it if I hafta)
Thanks,
PS: Apologies for reposting. I use Outlook Express and it "lost" the
reponses to my original post.
*****
Could someone explain this:
interface myInterface{
void foo();
}
then...
class myClass implements myInterface{
void foo(){
'do this
}
}
I want the Interface, its methods, and the implementing class and its
methods to have "package" level permissions. But I get the complier error:
attempting to assign weaker access privileges; was public
Could someone explain this (or provide a link that does) ?
Thanks
****
I got a one answer that mentioned that when it comes to interfaces they are
automatically public and abstract. The abstract aspect I accept.
But isn't there a way to create an interface that can only be implemented by
classes in the same package? Or more genereally a way to restrict who can
implement my interfaces? Separately, could an abstract base class be
declared with "package" level permissions to achieve the same goal (though I
don't care for that, I's do it if I hafta)
Thanks,
PS: Apologies for reposting. I use Outlook Express and it "lost" the
reponses to my original post.