Link to home
Start Free TrialLog in
Avatar of srikotesh
srikotesh

asked on

Interface with default methods vs Abstract class in Java 8

Hi Experts,

when to use default methods of interface?
why default method is introduced?
we can achieve same with abstract class?
can some one provide explanation with example?

Thanks
SOLUTION
Avatar of gurpsbassi
gurpsbassi
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of dpearson
dpearson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of srikotesh
srikotesh

ASKER

Hi dpearson,

can you please provide bit clarity on the below statements
interface with default methods means definitions with some implementations - no data
implementation will be there with out data?
abstract class means methods with definitions and some implementations plus data
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial