CS 121 Lecture Notes - Lecture 65: Doubly Linked List, Abstract Data Type, Linked List

23 views4 pages

Document Summary

Collection: an object that serves as a repository for other objects. Arraylist class represents a collection: provides methods to add elements to the end of a list or to a particular location in the list based on an index value, provides methods to remove specific elements as needed. Collections maintain their elements in a specific, but there are some that do not. Some collections are homogenous - they can contain all of the same type of object. Other collections are heterogeneous - they can contain objects of various types. heterogeneous, b/c it can hold an object of any type. An arraylist that doesn"t specify an explicit element type is an example of: it"s heterogeneous nature comes from the fact that an arraylist stores. Object references, which means that it can store any object b/c of inheritance & polymorphism. Collections can be implemented in a variety of ways.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions