I know how package level protection in java works. I read a lot of code (including lots of open source stuff) and no-one seem to be using it. The whole protection l
Are you talking about package-private protection in Java? That's the protection that is in effect by default for class members. It's useful occasionally if you got classes that interact intimately in a way that requires additional information or methods to be visible.
Say you have a Sink class, and several classes can write to that. The Sink has a public method that accepts basic data-types, and a package private method that accepts raw byte arrays. You don't want to make that method public, because you consider it too low-level for its users, but you want to make your other classes (in the package of the Sink) writing to that Sink use it. So you make the method accepting the byte array package private, and classes of your package such as ByteStreamSource could use it. Now, your protection looks like this:
User Code using the package User
------ | -----------------------------|----- package public Interface
| |
Sink <- package priv. iface -> Sources
The package private interface is orthogonal to the public interface established by the public methods. Package private'ness increases encapsulation, because it encourages you not to make public what shouldn't be public. It's similar to the friend keyword in C++ and the internal keyword in C#.