Why there was a need to use default methods in Interface

Mrityunjay Sharma mrityunjay2002 at gmail.com
Sun Mar 31 11:48:21 PDT 2013


Hi All,

I have a question regarding providing the support for adding default method
in interface.
When we are adding an implementation  in interface, compiler can itself
decide whether its an default implementation or not. As far as i know we
cannot use default methods for any class, instead we can only use it in
interfaces. Then why there was a need to use default methods.

Thanks & Regards,
Mrityunjay


More information about the lambda-dev mailing list