Answers for "can a interface implement another interface"

6

java interface

public interface Exampleinterface {
	
  public void menthod1();
  
  public int method2();

}

class ExampleInterfaceImpl implements ExampleInterface {


  	public void method1()
    {
        //code here
    }
  
    public int method2()
  	{
    	//code here
  	}

}
Posted by: Guest on May-28-2020
0

interfaces are used as

It is used to achieve total abstraction.
 Since java does not support multiple inheritance in case of class, but by using interface it can achieve multiple inheritance .
 It is also used to achieve loose coupling.
Posted by: Guest on June-08-2021

Code answers related to "can a interface implement another interface"

Browse Popular Code Answers by Language