Module 6 Flashcards
Which of the following are terminated by a semi-colon in Java?
A. a comment
B. an executable statement
C. a method definition statement
D. a class definition statement
E. an assignment statement
F. A variable definition statement
B. an executable statement
E. an assignment statement
F. A variable definition statement
Select all of the properties of recursion as used in computer programming from the list below
A. Recursion is composed entirely of arithmetic procedures
B. Recursion is a type of repetitious procedure
C. The execution of a recursive procedure is governed by the evaluation of a conditional clause
D. Recursion is a programming procedure which is capable of calling itself
B. Recursion is a type of repetitious procedure
C. The execution of a recursive procedure is governed by the evaluation of a conditional clause
D. Recursion is a programming procedure which is capable of calling itself
Select the purpose or purposes of the [] operator (double square brackets) from the expressions below
A. They specify that the preceding variable is an array
B. The may enclose a count of array members
C. They enclose a minor scope
D. They are arithmetic operators
E. They may enclose an expression which evaluates to an array index
A. They specify that the preceding variable is an array
B. The may enclose a count of array members
E. They may enclose an expression which evaluates to an array index
What is the index of the first element of an array in Java?
A. First
B. 1
C. 1.0
D. 0
D. 0
Which of the following statements are true regarding arrays in Java?
A. An array is a collection of variables which are accessed individually by using the name of its reference variable and an index
B. An array is a collection of variables which all share the same name
C. An array is a collection of primitive variables
D. An array is specified by putting a pair of square brackets following a variable name
A. An array is a collection of variables which are accessed individually by using the name of its reference variable and an index
B. An array is a collection of variables which all share the same name
Which of the following statements are true regarding arrays in Java?
A. The data in an array can either be primitive or derived
B. All elements of an array must be of the same data type
C. The notation of an array is any type of bracket
D. Once an array has been fully initialized, its data is fixed for the rest of the program’s execution
A. The data in an array can either be primitive or derived
B. All elements of an array must be of the same data type
D. Once an array has been fully initialized, its data is fixed for the rest of the program’s execution