0

This is not about abstract class vs interfaces.

I hope someone can explain the relationship between interface and ADT in Java. I think of an interface as a group of abstract methods. I understand that ADT focuses on what operations are possible but don't tell how they are implemented. I read that an interface specifies the operations of an ADT, but don't fully understand what this mean.

Thanks

MathisHard
  • 21
  • 3
  • 1
    possible duplicate of [What is the difference between an interface and abstract class?](http://stackoverflow.com/questions/1913098/what-is-the-difference-between-an-interface-and-abstract-class) – Scheintod Jul 22 '14 at 23:35
  • Oh and: https://stackoverflow.com/questions/761194/interface-vs-abstract-class-general-oo?rq=1 – Scheintod Jul 22 '14 at 23:36
  • @Scheintod An Abstract Data Type is different from an abstract class – Andres Jul 22 '14 at 23:42
  • You're right. I missed the focus of this question. (As has the other answer.) – Scheintod Jul 22 '14 at 23:57

1 Answers1

0

An Abstract Data Type is a purely theoretical entity. It´s inception precedes object orientation.

On the other side, interfaces are concrete constructions used in Java and other OO languages to indicate the methods that a class must implement.

Something that may confuse you is that Java interfaces, are abstract types, and not abstract data types.

Andres
  • 10,561
  • 4
  • 45
  • 63
  • Thanks, I'm beginning to understand this more. I'll guess there's some gray area about these definitions, but as far as I understand it, I can use interfaces to create ADTs – MathisHard Jul 22 '14 at 23:48