SYSC 2100 Lecture 5: Linked Lists

85 views3 pages

Document Summary

Data must be shifted during insertions and deletions. Is able to grow in size as needed. Does not require shifting of items during insertions and deletions. As a data field of a class has a default value of null. A reference variable local to a method does not have a default value (compiler error) When one reference variable is assigned to another reference variable, both references then refer to the same object. An object that is no longer accessible through any reference variable is marked for garbage collection. An array of objects is actually an array of references to the objects. == and != compares the values of the reference variable, not the objects that they reference. Redefine equals method compares objects field by field. When an object is passed to a method as an argument, the reference to the object is copied as a formal parameter. Reference - based adt implementations and data structures use java references.

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