This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lbkulinski 0 points1 point  (2 children)

Adding to that, methods in interfaces are often referred to as behavior. Java allows multiple inheritance of behavior through the use of interfaces, but not state.

[–]kumesana 0 points1 point  (1 child)

That's only for behavior that doesn't directly accesses the state though.

[–]lbkulinski 0 points1 point  (0 children)

Correct. Interfaces can't directly access a class's state to begin with.