MATH 114 Final: MATH 114 UPenn 114Final 2012A Exam

12 views17 pages
31 Jan 2019
School
Department
Course
Professor

Document Summary

1: true or false (10 points) a. To call the constructor of the arraylist class, you must specify a size. An instance of this class cannot store more than that number of elements. b. The linkedlist class in the java collections framework implements immutable lists, just like ocaml"s list type. c. d. e. f. It is possible to write your own instance of the set interface in java. The binary search tree invariant means that the process of determining whether a particular value appears in a tree does not require searching the entire tree. Every mutable reference in ocaml could refer to none. In a java method, assignment to the this reference can be used to ef ciently change the entire state of an object. g. A method with the following declaration de nitely will not throw an ioexception to a calling context. public void m() {} h.