interface Static Methods in Java


Static methods in interfaces are not inheritable, providing a way to define utility methods related to the interface.

Source Code

interface Animal {
    static void breathe() {
        System.out.println("Breathing");
    }
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments