Can Interface extend another Interface

Can Interface extend another Interface

Answer: Yes. In java it is possible to expend another interface and inherit all method form it.

package com.javahonk.interfacetest;

public interface AInterface {
public void m1();
public void m2();
}

 

package com.javahonk.interfacetest;

public interface BInterface extends AInterface {
public void m2();
}

 

Leave a Reply

Your email address will not be published. Required fields are marked *

I am not Robot *