newbie newbie - 2 months ago 22
Java Question

Interface vs Abstract Classes

I am a little bit familiar with the difference between Abstract and Interface classes but
What do you think is the meaning of the sentence below?


An interface can only define constants while abstract class can have fields.

Answer

An interface can only define constants while abstract class can have fields.

your field from interface is by implicitly public, static, final

which isn't case with abstract class

Comments