Java, Java8, Java21, Java17, Migration.
implements Greeting { // No need to override the default greet() method } public class Main { public static void main(String[] args) { Person person = new Person(); person.greet(); // Will use the default method implementation } } In this example, the Greeting interface defines a default method