// Interface interface Printable { void print(); } // Class implementing the interface class Printer implements Printable { @Override public void print() { System.out.println("Printing..."); } } public class InterfaceExample { public static void main(String[] args) { // Creating an instance of the class implementing the interface Printable printer = new Printer(); // Using the interface method printer.print(); } }