Exam 6: Methods: a Deeper Look

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Which of the following statements is false?

Free
(Multiple Choice)
4.9/5
(34)
Correct Answer:
Verified

A

Variables should be declared as fields only if ________.

Free
(Multiple Choice)
4.9/5
(31)
Correct Answer:
Verified

C

Which is a correct static method call of Math class method sqrt?

Free
(Multiple Choice)
4.8/5
(36)
Correct Answer:
Verified

C

Declaring main as static allows the JVM to invoke main ________.

(Multiple Choice)
4.8/5
(36)

A well-designed method ________.

(Multiple Choice)
4.8/5
(25)

Which operator can be used in string concatenation?

(Multiple Choice)
4.8/5
(36)

An overloaded method is one that ________.

(Multiple Choice)
4.7/5
(33)

Stacks are known as ________ data structures.

(Multiple Choice)
4.8/5
(36)

Method calls cannot be distinguished by ________.

(Multiple Choice)
4.8/5
(38)

A set of named constants that start with the value 0 for the first constant and increment by 1 for each subsequent constant can be declared as a(n) ________.

(Multiple Choice)
4.9/5
(38)

Consider the following Java statements: int x = 9; Double y = 5.3; Result = calculateValue(x, y); Which of the following statements is false?

(Multiple Choice)
4.8/5
(41)

Which of the following statements is false?

(Multiple Choice)
4.9/5
(33)

The parameter list in the method header and the arguments in the method call must agree in:

(Multiple Choice)
4.7/5
(27)

A static method can ________.

(Multiple Choice)
4.9/5
(38)

Which of the following is not a package in the Java API?

(Multiple Choice)
4.9/5
(47)

Which of the following can be an argument to a method?

(Multiple Choice)
4.7/5
(28)

Which of the following primitive types is never promoted to another primitive type?

(Multiple Choice)
4.9/5
(29)

Overloaded methods always have the same _________.

(Multiple Choice)
4.7/5
(49)

Which statement creates a random value from the sequence 2, 5, 8, 11 and 14. Suppose randomNumbers is a SecureRandom object.

(Multiple Choice)
4.9/5
(34)

Which statement below could be used to simulate the outputs of rolling a six-sided die? Suppose randomNumbers is a SecureRandom object.

(Multiple Choice)
4.8/5
(42)
Showing 1 - 20 of 38
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)