Default method survey results
Peter Levart
peter.levart at marand.si
Thu Aug 16 07:22:26 PDT 2012
On Thursday, August 16, 2012 02:33:41 PM Maurizio Cimadamore wrote:
> I think default != concrete - at least under some interpretations of it.
> In the example I gave, you have a concrete method that does not override
> an abstract method in the superclass, because superclass methods always
> win, even if abstract. This is what, in my mind at least, makes a
> default method a different beast.
Ok, I understand the reasoning now. To recap:
Java 8 (will) have 3 types of public (or virtual) methods:
- concrete methods (only in classes)
- abstract methods (in classes and interfaces)
- default methods (only in interfaces)
- concrete methods do not have a modifier
- abstract methods have "abstract" modifier (which is implicit in interfaces)
- default methods have "default" modifier
Regards, Peter
More information about the lambda-dev
mailing list