Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ADT? What is it??

 
Aditya Herlambang
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys I just learned about this what is called ADT in java, but still I don't quite understand what it is. I tried reading the books several times but still I can't get the concept of what it is.
There is also a keyword 'extend', what is that actually?? There is also the terminology of collection, Set<E>, bag, and List ADT. What is all that about?? Can someone explain it to me very briefly?? Many thanks to those who are willing to help me
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34410
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aditya,
Welcome to JavaRanch!

ADT stands for abstract data type. It is a data type that can be implemented in different ways. For example, Set is an interface that defines the methods you can expect in a set. AbstractSet implements some of the methods. It is still abstract though as the implementation may vary. There are several concrete implementations of Set like HashSet (uses keys) and TreeSet (uses sorting.)

The "extends" keyword defines a superclass. For example, HashSet extends AbstractSet in that it adds implementation to the abstract type.

Wikipedia explains this in more detail. If you have any more specific questions, feel free to reply to this thread.
 
Aditya Herlambang
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and what is the relationship between ADT and class?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic