CSIS 212 WEEK 6 QUIZ -
QUESTION AND ANSWERS
• Question 1
1 out of 1 points
Which statement below could be used to simulate the outputs of tossing a quarter to
get heads or tails? Suppose randomNumbers is a SecureRandom object.
Selected Answer: randomNumbers.nextInt(2);
• Question 2
1 out of 1 points
Overloaded methods always have the same _________.
Selected Answer: method name
• Question 3
1 out of 1 points
Which of the following statements is false?
Selected If a method does not return a value, the return-value-type in the
Answer:
method declaration can be omitted.
• Question 4
1 out of 1 points
Method calls cannot be distinguished by ________.
Selected Answer: return type
• Question 5
1 out of 1 points
A static method can ________.
Selected Answer: All of the above.
• Question 6
1 out of 1 points
Which of the following methods are overloaded with respect to one another?
public int max (int a, int b) { … }
public double max (double a, double b) { … }
public int max (int a, int b, int c) { … }
public double max (double a, double b, double c) { … }
Selected Answer: All four methods are overloaded.
• Question 7
1 out of 1 points
QUESTION AND ANSWERS
• Question 1
1 out of 1 points
Which statement below could be used to simulate the outputs of tossing a quarter to
get heads or tails? Suppose randomNumbers is a SecureRandom object.
Selected Answer: randomNumbers.nextInt(2);
• Question 2
1 out of 1 points
Overloaded methods always have the same _________.
Selected Answer: method name
• Question 3
1 out of 1 points
Which of the following statements is false?
Selected If a method does not return a value, the return-value-type in the
Answer:
method declaration can be omitted.
• Question 4
1 out of 1 points
Method calls cannot be distinguished by ________.
Selected Answer: return type
• Question 5
1 out of 1 points
A static method can ________.
Selected Answer: All of the above.
• Question 6
1 out of 1 points
Which of the following methods are overloaded with respect to one another?
public int max (int a, int b) { … }
public double max (double a, double b) { … }
public int max (int a, int b, int c) { … }
public double max (double a, double b, double c) { … }
Selected Answer: All four methods are overloaded.
• Question 7
1 out of 1 points