Java program for Interface
KW.java
Output
kodingwindow@kw:~$ javac KW.java
kodingwindow@kw:~$ java KW Addition 30 Subtraction 10 kodingwindow@kw:~$
What Next?
How to achieve multiple inheritance in Java using interfaces
How to achieve multiple inheritance in Java using interfaces and default methods
Java Collections
Advertisement