CIS 120 Midterm: CIS 120 UPenn Midterm2 sp13 solutions
Document Summary
In the java asm, object values are stored in the heap. In the java asm, method de nitions are stored in the heap. In the java asm, a (nonstatic) method dispatch o. m() uses the static type of o to determine which version of the method m to invoke. d. In the java asm, a (nonstatic) method dispatch o. m() implicitly pushes the this reference onto the stack. e. f. g. h. i. j. Once an array is allocated, its length cannot be changed. If x is an array of length 7, the expression x[7] will trigger an. The expression new c() invokes the main method of the class c. Instance variables (aka elds) can never be null. Object is a superclass of all classes in java. Write down a type for each of the following java variable de nitions. Due to subtyping, there may be more than one correct answer.