Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 11, 2005, 09:29 PM   #1
Dr. No
macrumors regular
 
Join Date: Sep 2003
Abstract Data Types

Can someone explain what an Abstract Data Type is in Java? Plus, what does it look like, and what does it do?
__________________
It's all about the Pentiums.
Dr. No is offline   0 Reply With Quote
Old Dec 11, 2005, 10:31 PM   #2
kanaka
macrumors member
 
Join Date: Jul 2002
Quote:
Originally Posted by Dr. No
Can someone explain what an Abstract Data Type is in Java? Plus, what does it look like, and what does it do?
An Abstract Data Type (ADT) in any programming language is an entity that is only defined by the type of data stored and the operations that may be performed on that data. That is, the operations of an ADT are defined in a public interface, but the specific way in which the operations are implemented is hidden within the ADT. The person using the ADT doesn't need to know anything about the implementation details.

A common example of an ADT is a list. A list may have a set of public methods to insert or remove objects, but the implementation details are hidden inside the ADT. The list might be implemented using an array or a linked-list, but the person using the class doesn't need to know or care about these details.

In Java, ADTs are frequently created by defining in interface, and then concrete classes "implement" the interface. http://java.sun.com/docs/books/tutor...interface.html
There are also Abstract classes and abstract methods in Java, but it sounds like you're asking more about the general ADT concept.

http://en.wikipedia.org/wiki/Abstract_data_type
kanaka is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Data Types and Expressions. RobertD63 iPhone/iPad Programming 5 Feb 4, 2010 06:01 PM
Core Data type entity best practice? GorillaPaws Mac Programming 0 Dec 5, 2009 01:47 PM
Data types and expressions. I really need to know it? (Base of 8 etc.) RobertD63 iPhone/iPad Programming 5 Aug 3, 2009 02:05 AM
input file with multiple types of data types Beckie Mac Programming 2 May 5, 2005 12:02 PM


All times are GMT -5. The time now is 04:19 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC