MATH 241 Midterm: MATH 241 UPenn 241Fall 03 Exam
Document Summary
My signature below certi es that i have complied with the university of pennsylvania"s code of. /120: do not begin the exam until invited to do so, you have 120 minutes to complete the exam. If you nish before 15 minutes from the end, feel free to leave early. 1: true or false (10 points) a. In ocaml, the binding between a variable and its value can never be changed. b. In ocaml, if x is a variable of any type, some x == some x will always return true. c. In java, it is good practice, when overriding the equals method from object, to override the hashcode method as well. d. In java, the default implementation of equality in the object class uses reference equality for mutable objects and structural equality for immutable objects. e. Java"s subtype polymorphism is very similar to ocaml"s parametric polymorphism, whereas java"s generics are a different thing with no direct analog in ocaml. f.