Module 6 Flashcards

1
Q

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

A

B. an executable statement

E. an assignment statement

F. A variable definition statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the index of the first element of an array in Java?

A. First

B. 1

C. 1.0

D. 0

A

D. 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly