Java / Interface
Can an interface inherit/extend multiple interface?
Yes.
package com.tutorials.interfaceExample; public interface MyInterface extends ParentInterface1, ParentInterface2 { void method(); } class ImplementingClass implements MyInterface { @Override public void method() { System.out.println("HI"); } } interface ParentInterface1 { void method(); } interface ParentInterface2 { void method(); }
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
More Related questions...