default methods vs abstract class

Hi,

I was reading below link

http://www.java2blog.com/2014/06/interface-default-methods-in-java-8.html

I have not understood below point relating to state

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

what is state of object?
How it one can hold and other cannot hold?

Also what it mean by overriding method to solve compilation error as below
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

please advise
LVL 7
gudii9Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CPColinSenior Java ArchitectCommented:
For your first question: Abstract classes can have member variables. Interfaces can't.

For your second question: If you implement more than one interface that has a default method with the same signature, you have to provide your own implementation of that method. If you don't provide one, the compiler can't tell which default method you wanted and gives you that error.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.