K&B say: "Interfaces can be implemented by any class from any inheritance tree." Can an interface be declared inside a package? Interface can also have "default" access level, right? If yes, the above sentence is a bit misleading. It should also include, "provided if the interfaces are visible". The authors no where discussed the access levels of interfaces and the inclusion of interfaces in packages. Correct me if I am wrong.
It is clear (anyway, to me it is) that the interface being implemented must be accessible. If K&B went into every detail like this it vould be an extremly thick and chatty Java Language Specification. I would rather worry about the things it tells you that are wrong.
Thanks Barry! "Can an interface be declared inside a package?" should have been "Interfaces can also be declared inside a package, right?"
Well, the book says it covers 100% details of exam. And it also says, to start with the book a minimum knowledge of Java is ok. I am not saying that the book is wrong or not worthful. I am saying, a few details are missing which would have been included in the book. Many ranchers have identified such missing info. To me thickness of the book is not a concern. Information it gives me is most important factor - be it a reference to some other book/web etc.
Whose rules are you playing by? This tiny ad doesn't respect those rules: