1/18
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Linked list
a sequence of objects where one object references the next
Linked lists are stored in contiguous memory
False, they can grow dynamically without the need to reallocate memory
Abstract Data Type
describes what operations can be performed on data, not how they are implemented
The List add method
shifts object currently at that position and any subsequent objects to the right
The List remove method
shifts object currently at that position and any preceding objects to the left
Code from the List interface is compatible with
implementing classes (polymorphism)
If we were to lose the head reference, we would lose access to
the first node
pro to an array
fast access to elements
con to an array
expensive to resize
pro to a linked list
easy to add new elements
con to a linked list
slower access to elements
if no variable stores a node
it becomes unreachable
which visibility does not require a modifier keyword
package private
least to most visibility
private, package private, protected, public
where can we view private members
same class
where can we view package private members
same class, same package
where can we view protected members
same class, same package, child class
where can we view public members
same class, same package, child class, elsewhere
even if methods are public…
the class must be visible first to use that method