Java 8 introduced default methods in interfaces, allowing you to define a method body. This helps in evolving interfaces without breaking existing implementations.
Source Code
interface Animal {
default void eat() {
System.out.println("This animal eats food");
}
}