Originally posted by vijay malhotra:
Hi Manfred
Thanks for replying. But I still have doubt.I was not able to understand clearly.
But what if we still want that a method of an interface should be kept as private method for the class that implements the interface ? Will the compiler will report an error ? If yes why?
Regards
Vijay
Interface is probably one of the best features of
Java to avoid multiple inheritence. It is yuckky in some way to inherit the implementation from multiple parents..
Now.. coming to your question. Manfred explains it very clearly.
All the interface methods are by default public. They cant go lower on their accessibility during implementation.. gives a compile time error
HIH
Ragu