CIS 120 Midterm: CIS 120 UPenn Midterm2 15sp blank Exam

18 views10 pages

Document Summary

My signature below certi es that i have complied with the university of pennsylvania"s code of. 1: general understanding of ocaml and java: true/false (20 points) In both java and ocaml, if v1 and v2 are references, then the expression v1 == v2 evaluates to true exactly when they alias. b. The following ocaml function will terminate by exhausting stack space if called as loop 10. let rec loop (x:int) : int = if x = 0 then 1 else loop x c. ;; x. contents ()) :: x. contents) d. A well-typed ocaml program can fail with an error because it tried to use a null pointer. e. In java, a class that is a subtype of an interface must directly implement or inherit every method mentioned in the interface. f. Two java classes can both have a method named m only when one is a subclass of the other. g.

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