Re: [ljc] Re: Defender Methods

From: Richard W.
Sent on: Monday, August 20, 2012 3:52 PM
> This might be a silly question but... What's the difference between an interface with a default method and an abstract class with an implementation for that method?

There are two key differences that you should be aware of:

1. Because you can inherit from multiple interfaces, you can inherit
implementations from multiple default methods.
2. When you dispatch a call to an inherited method the selection
mechanism is different.  Specifically any class based implementation
of a method will override a default method, even if the default method
is closer in the class hierachy.



Our Sponsors

  • Our Blog

    Read the latest news from the LJC

  • RecWorks Ltd

    Fixing Tech Recruitment using the Power of Community

  • jClarity

    Java/JVM Performance Analysis Tools & mentoring for Java related matters

  • LJC Aggrity

    Our LJC Aggrity site contains blog posts from our members

  • LJC Book Club

    Our Book club with book reviews from our members

  • Devoxx UK

    Java Community Conference, in collaboration with the LJC 12/13 Jun 14

  • SkillsMatter

    "Host, help organise, promote, film many of our meetings."

  • Packt Publishing

    A publishing company specializing on specific technologies and solutions

  • Java.Net

    We are an official Java User Group recognised by Oracle's JUG program

  • JRebel

    Free 3 month J-Rebel license.

  • O'Reilly

    40% discount on printed books and 50% on e-books.

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy