Parameter
Abstract class
Interface with default methods
State of objects
Abstract class can hold state of object
Interface with default methods can not hold state of objects
Read more at http://www.java2blog.com/2014/06/interface-default-methods-in-java-8.html#vEL23vv16DICqYjs.99
you can solve this compilation error by overriding decorateWithPaints method in Room class
view plainprint?
public class Room implements Decorable,Paintable{
public void decorateWithPaints()
{
System.out.println("Decorate using paints");
}
}
Read more at http://www.java2blog.com/2014/06/interface-default-methods-in-java-8.html#4dayfCwCZs3KPu77.99