vamsi acharya wrote:I meant how can we directly implement the methods of interfaces by importing them ??? Methods of interface dont have body right ???
You don't. Or more correctly, it doesn't.
Importing an interface (or class) just brings the definition into scope, so you can use it. In this case, so you can declare your class as "implements aInterface" (without using the fully qualified name) and the compiler will know what you are talking about.
It doesn't mean that the interface is implemented. You actually need to actually implement the methods of the interface (or declare your class as abstract), or the compiler will complain.
Henry