Midterm Multiple Choice Flashcards
Which of these are NOT a value type?
a) int
b) null
c) boolean
d) String
e) double[]
null, String and double[] are not value types
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.
b, c
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
Which of the following are true of methods? a) b) c) d) e)
w
a) b) c) d) e)
q
a) b) c) d) e)
q
a) b) c) d) e)
q
a) b) c) d) e)
q
a) b) c) d) e)
q
a) b) c) d) e)
q
a) b) c) d) e)
q
a) b) c) d) e)
q
a) b) c) d) e)
q
a) b) c) d) e)
q
a) b) c) d) e)
q