COSI 12b Study Guide - Final Guide: Binary Search Tree, Linear Probing, Sequential Access

119 views1 pages

Document Summary

Static fields are shared by all objects of a class; each object does not have their own field. Use a constructor in an abstract class when final fields have been declared but not yet initialized, or if you want to initialize the fields before a subclass initializes them. Interface iterator in java. util; every collection has an iterator() method that creates an object that implements the iterator interface. The remove method of the iterator works differently from other remove methods; it will remove the previously read element. An iterator will keep track of the linkedlist s position. In a list of strings, an iterator is created with iterator itr = list. iterator();. Arraylist uses random access, while linkedlist uses sequential access to get a position. If the node is a leaf, replace with null. If the node only has a left/right child, replace it with the child. If the node has both children, replace with the minimum from the right.

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

Related Documents