default method in java
Some interface methods have a body. Such methods are called default Although default methods are implemented, you cannot invoke them directly from an interface. You still need to have an object of a class that implements the interface. If you want to customize a default method in a class, just override it like a regular method. Sometimes default methods are huge. To make it possible to decompose such methods, Java allows declaring private methods inside an interface That allows you to add new methods to the existing interface without changing all classes that implement the interface