I've read these two pages
but I still don't get the difference between a published and public method. An example in Java would be helpful. Thanks in advance.
public
Public interfaces written in Java:
interface MyInterface { ... }
public interface MyInterface { ... }
class MyClass() {
void anotherInterface() { ... }
public void someOtherInterface() { ... }
}
All of them are public because they are not only available for internal objects.
published
The status of published interface is not part of the Java language, it is part of what some may call application architecture. It is in a higher level of abstraction.
Now, the relationship between the two:
Note: The concept does not apply literally to only Java interfaces, it could also be class, methods etc.
To dig deeper: Public versus Published Interfaces
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With