CSE 2221 Midterm 2 Examination 2025. | Exam Revision Questions And
Correct Answers | Graded A+ | 2025 Update |
mathematical string - ANSWER- part of java contracts; as opposed to Java Strings being a part
of code.
< > in contracts - ANSWER- Javadoc comment for string values
<1, 2, 3, 2>
< 'g' , 'o' >
* in contracts - ANSWER- denote concatenating strings
distinguished formal parameter - ANSWER- labeled using the word "this", parameter not
explicitly said in a method's parameter list (called the receiver in the method body)
is transferFrom or copyFrom more efficient? - ANSWER- transferFrom
primitive types - ANSWER- built into Java, can fit into 64 bits (boolean, char, int, double)
reference types - ANSWER- can't fit into 64 bits, value is a reference(or id) that refers to an
object with a value
reference value - ANSWER- the memory address of the reference type
object value - ANSWER- mathematical value of the object
mutable reference types - ANSWER- reference types for which at least one method can change
the object value of the reference type
Correct Answers | Graded A+ | 2025 Update |
mathematical string - ANSWER- part of java contracts; as opposed to Java Strings being a part
of code.
< > in contracts - ANSWER- Javadoc comment for string values
<1, 2, 3, 2>
< 'g' , 'o' >
* in contracts - ANSWER- denote concatenating strings
distinguished formal parameter - ANSWER- labeled using the word "this", parameter not
explicitly said in a method's parameter list (called the receiver in the method body)
is transferFrom or copyFrom more efficient? - ANSWER- transferFrom
primitive types - ANSWER- built into Java, can fit into 64 bits (boolean, char, int, double)
reference types - ANSWER- can't fit into 64 bits, value is a reference(or id) that refers to an
object with a value
reference value - ANSWER- the memory address of the reference type
object value - ANSWER- mathematical value of the object
mutable reference types - ANSWER- reference types for which at least one method can change
the object value of the reference type