Prior to Java 8 the interface only contains method signatures. But after Java 8 interface can have Default Methods means you can include method body within the interface and use default keyword with method.

Suppose you have a project where 100 classes implements an interface and after that you want to add one more method in the existing interface then you need to change code in all 100 classes for this new method otherwise code will break but after Java 8 you can add default method in the interface using default keyword and you do not need to implement the default method in all 100 classes but you can override default method also to provide more specific implementation for the method.

Here is the example of default method.

package com.javatutsworld;

public interface MyInterface {

    // this is Java 8 default method
    default void MyMethod() {
        System.out.println("this is MyMethod from MyInterface");
    }

    // this is abstract method  
    void Hello(String msg);
}


package com.javatutsworld;

public class Java8DefaultMethod implements MyInterface {

    public void Hello(String str) {
        System.out.println("Hi this is: "+str);
    }
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Java8DefaultMethod java8DM = new Java8DefaultMethod();
        java8DM.MyMethod();
        java8DM.Hello("Saaim");
    }

}

Output

this is MyMethod from MyInterface
Hi this is: Saaim

static method in Interface in Java 8

Java 8 static methods in interface are similar to default method this method also you do not need to implement in the implementation classes, so you can add static method to the existing interfaces without changing the code in the implementation classes. But static method we cannot override in the implementation classes.

Here is example of static method in Interface in Java 8

package com.javatutsworld;
public interface MyInterface {
    // this is Java 8 default method
    default void MyMethod() {
        System.out.println("this is MyMethod from MyInterface");
    }
    // this is abstract method
    void Hello(String msg);
    // this is static method    
    static void Morning(String msg){    
        System.out.println(msg);    
    }
}

package com.javatutsworld;
public class Java8DefaultMethod implements MyInterface {
    public void Hello(String str) {
        System.out.println("Hi this is: "+str);
    }
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Java8DefaultMethod java8DM = new Java8DefaultMethod();
        java8DM.MyMethod();
        java8DM.Hello("Saaim");
        MyInterface.Morning("Good Morning");
    }
}

Output

this is MyMethod from MyInterface
Hi this is: Saaim
Good Morning

Please click on below link for more details

https://docs.oracle.com/javase/tutorial/java/IandI/defaultmethods.html