Originally Posted by
Learning2Java
How can the other guy compile his code if the interface is in my code already compiled? If he writes that board alternative above, doesn't the interface have to be in his directory (or classpath, or whatever), so he can compile his code? Can you do that with the interface that's already compiled?
Think about it this way: you implement interfaces that have already been compiled every time you implement an interface from the Java API itself. Providing your own API is exactly like that: you give somebody else access to some code you wrote in the form of public methods (which might interact with other private methods you wrote).
Of course, you *could* give the other person access to your source code. But there's nothing saying you *have* to do that.