Midterm Multiple Choice Flashcards

1
Q

Which of these are NOT a value type?

a) int
b) null
c) boolean
d) String
e) double[]

A

null, String and double[] are not value types

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

Which of these statements are true of an expression?

a) A string is not an expression.
b) An expression always results in a value.
c) A literal integer is a valid expression.
d) Expressions can not be combined using mathematical operators.
e) A void method call can be part of an expression.

A

b, c

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

Which of these statements are true of loops?

a) A for loop can always be written as a while loop.
b) The keyword end can be used to immediately exit the loop body.
c) A loop cannot contain another loop
d) The body of a loop will execute at least once.
e) A switch statement is a type of loop

A

a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
Which of the following are true of methods? 
a) 
b)
c)
d)
e)
A

w

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
a) 
b)
c)
d)
e)
A

q

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
a) 
b)
c)
d)
e)
A

q

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
a) 
b)
c)
d)
e)
A

q

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
a) 
b)
c)
d)
e)
A

q

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
a) 
b)
c)
d)
e)
A

q

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
a) 
b)
c)
d)
e)
A

q

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
a) 
b)
c)
d)
e)
A

q

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
a) 
b)
c)
d)
e)
A

q

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
a) 
b)
c)
d)
e)
A

q

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
a) 
b)
c)
d)
e)
A

q

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
a) 
b)
c)
d)
e)
A

q

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
a) 
b)
c)
d)
e)
A

qq

17
Q
a) 
b)
c)
d)
e)
A

q

18
Q
a) 
b)
c)
d)
e)
A

q

19
Q
a) 
b)
c)
d)
e)
A

qq

20
Q
a) 
b)
c)
d)
e)
A

q