OSU CSE 2221 Midterm 2 Exam Questions AND Correct
Answers
#<variable_name> - ✔✔# represents the old (incoming) variable value
aliasing of references - ✔✔unintentionally modifying an object due to
multiple references pointing to it
only affects mutable types
anonymous reference variable - ✔✔temporary, inaccessible variables
creating while performing operations during the assignment to a
variable
int i = k + 7 has two anonymous reference variables
array - ✔✔group of variables of the same type
always a reference type
array element - ✔✔single variable within an array
Assertion - ✔✔claim that some boolean expression is true
assignment operator - ✔✔=, copies the value of an expression on the
right side into the variable on the left side
, causing of aliasing - ✔✔assignment, parameter passing
clear parameter mode - ✔✔signifies that the object's value will be
reset to its initial value
command interpreter - ✔✔user provides inputs and observes actual
results
concatenation - ✔✔combining strings
shown with a * in mathematical models
constructor - ✔✔a method that creates an instance of a class
copy constructor - ✔✔returns a copy of the parameter value
declared type - ✔✔type of the variable
distinguished formal parameter - ✔✔this
expression tree - ✔✔using a tree to represent a formula or expression
in java
Answers
#<variable_name> - ✔✔# represents the old (incoming) variable value
aliasing of references - ✔✔unintentionally modifying an object due to
multiple references pointing to it
only affects mutable types
anonymous reference variable - ✔✔temporary, inaccessible variables
creating while performing operations during the assignment to a
variable
int i = k + 7 has two anonymous reference variables
array - ✔✔group of variables of the same type
always a reference type
array element - ✔✔single variable within an array
Assertion - ✔✔claim that some boolean expression is true
assignment operator - ✔✔=, copies the value of an expression on the
right side into the variable on the left side
, causing of aliasing - ✔✔assignment, parameter passing
clear parameter mode - ✔✔signifies that the object's value will be
reset to its initial value
command interpreter - ✔✔user provides inputs and observes actual
results
concatenation - ✔✔combining strings
shown with a * in mathematical models
constructor - ✔✔a method that creates an instance of a class
copy constructor - ✔✔returns a copy of the parameter value
declared type - ✔✔type of the variable
distinguished formal parameter - ✔✔this
expression tree - ✔✔using a tree to represent a formula or expression
in java