Or more exactly, you are creating a brand new class that is an anonymous inner class and which inherit (implements) the interface. It is called an anonymous inner class because it not has a name of its own and it can therefore not be instantiated explicitly without going through the method testMethod() and it can only be referenced through an reference variable with the type Interface.

This is an example why I like Java that much! It has a lot of useful constructs to support good object oriented design! With that said should anonymous inner classes be used with care to not caus code that is hard to read.

It's true that in the code an implementation of the interface is getting instantiated. But what I am confused is that since we did'nt declare explicitly the implements keyword to implement the interface something like the below code

so how could the statement new Greetable() in the method is valid.

Or is it something that the class is implicitly inheriting the interface when an anonymoous class is being creating in the method ?

that statement is valid anyway because you are using curly braces({) before ending your statement with semicolon hence you are telling your compiler that, you are implementing interface here in curly braces(using anonymous class name). So it allows you to create instance of it.