1
CSE 205 midterm Questions with Correct
Answers | Updated (100% Correct Answers)
In Java, functions are called ___. Answer: Methods
We can use a variable as an index expression to access an array
element in Java. Answer: True
Java uses the ^ (caret) operator for exponentiation. Answer: False
In Java parameter variables must be declared with their data type.
Answer: True
Method overloading distinguishes between methods based on _____.
Answer: both
number of arguments
and
data types of arguments
In Java, arrays can only store primitive types. Answer: False
Which of the following correctly demonstrates the use of an array
initializer list? Answer: Int[] my_array = {1, 2, 3, 4, 5};
© 2025 All rights reserved
, 2
Which of the following is/are true about arrays? Choose all that
apply. Answer: the elements of an array all located contiguously in
memory
an array is a set of variables
the elements of an array are accessed by an integer index
the elements of an array all have the same data type
Java arrays have an attribute named _____ that can be accessed to
get the size (number of elements) of the array. Answer: Length
We cannot delete individual elements from an array in Java.
Answer: True
Arrays cannot be passed as arguments to methods in Java. Answer:
False
The idea of looping through an array (element-by-element) looking
for some element that meets our criteria, is called a(n) _____.
Answer: linear search
The first element of an array is located at index _____. Answer: 0
You cannot have an object reference whose type is an abstract class.
Answer: False
You can instantiate an object of an abstract class. Answer: False
© 2025 All rights reserved
CSE 205 midterm Questions with Correct
Answers | Updated (100% Correct Answers)
In Java, functions are called ___. Answer: Methods
We can use a variable as an index expression to access an array
element in Java. Answer: True
Java uses the ^ (caret) operator for exponentiation. Answer: False
In Java parameter variables must be declared with their data type.
Answer: True
Method overloading distinguishes between methods based on _____.
Answer: both
number of arguments
and
data types of arguments
In Java, arrays can only store primitive types. Answer: False
Which of the following correctly demonstrates the use of an array
initializer list? Answer: Int[] my_array = {1, 2, 3, 4, 5};
© 2025 All rights reserved
, 2
Which of the following is/are true about arrays? Choose all that
apply. Answer: the elements of an array all located contiguously in
memory
an array is a set of variables
the elements of an array are accessed by an integer index
the elements of an array all have the same data type
Java arrays have an attribute named _____ that can be accessed to
get the size (number of elements) of the array. Answer: Length
We cannot delete individual elements from an array in Java.
Answer: True
Arrays cannot be passed as arguments to methods in Java. Answer:
False
The idea of looping through an array (element-by-element) looking
for some element that meets our criteria, is called a(n) _____.
Answer: linear search
The first element of an array is located at index _____. Answer: 0
You cannot have an object reference whose type is an abstract class.
Answer: False
You can instantiate an object of an abstract class. Answer: False
© 2025 All rights reserved