This example shows how to implement interfaces in Java. First, we define an interface Animal with a method sound(). Then, the Dog class uses 'implements Animal' to promise it will provide the sound() method. Dog overrides sound() to print 'Woof'. In main, we create a Dog object but assign it to an Animal variable. When we call sound() on this variable, Dog's version runs and prints 'Woof'. The program ends after this. Key points: 'implements' means the class must provide all interface methods. You can use an interface type variable to hold any object of classes that implement it.