Skip to content

NamHuynh1308/CP5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

CP5

10/4/21

Reviewing and asking question

10/6/21

Exam 1

10/11/21

Shifting elements in an array (exam 1 answer)

Exception

Java Collection Framework (JCF)

Lists, Stacks, Queues, Priority, Sets, and Maps

_Data structures vs Abstract data types

*Data structure

+A specific way of organizing data and operations to access/use the data

+Structure of the data tied directly to the implementation

*Abstract data type: An implementation independent group of data and a set of operations on this data – use a programming language to implement

_Both arrays and ArrayList are data structures

Implementation dependent

Same characteristics: Duplicate elements, unordered lists, use index to access elements, null values

Difference: array is static in size, ArrayList is dynamic in size, automatic resizing may slow down the performance, ArrayList can not have primitive data type, arrays can

_Collection Interface

Collection interface provides add(), remove(), contains(), Iterator: a mean of iterating over all objects in the collection

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published