17 terms

Java Collections Framework

Computer Programming with Java: JCF
STUDY
PLAY
Data Structure
A Collection of Data Organized in some fashion. [Stores Data + Supports operations for Accessing & Manipulating the data.]
ArrayList
A Data Structure to store elements in a list
Container
Another word for Data Structure aka Container Objects
Data Structure/Container
An Object that stores other objects referred to as data or elements.
True of False? To create a data structure is to create an instance from the class.
True ( You can then apply methods on the instance to manipulate the data structure like insertion or deletion)
Two Type of JCF Containers
(1) Collections [Stores a collection of elements] and (2) Maps [Stores key/value pairs (efficient for fast searching an element using a key)]
Three Types of JCF Collections
Set, List, and Queue
Collection
A Container that stores objects
Set
An instance of this object stores a group of nonduplicate elements
List
Stores an ordered collection of elements
Queue
Stores objects that are processed in FIFO fashion
Interfaces in the JCF
Defines the Framework (ex. Sets, Iterator)
Abstract Classes in JCF
Provides partial implementation for convienience
Concrete Classes in the JCF
Implements the interfaces with concrete data structures
The Collection Interface
The Root interface for manipulating a collection of objects. ( Provides basic operations for adding & removing elements.)
Query
Ask/request information from a database
True of False? A Collection may be a Set or a List?
True!