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
(82)
Correct Answer:
Verified

A

Variables should be declared as fields only if ________.

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

C

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

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

C

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

(Multiple Choice)
4.9/5
(86)

A well-designed method ________.

(Multiple Choice)
4.8/5
(70)

Which operator can be used in string concatenation?

(Multiple Choice)
4.8/5
(75)

An overloaded method is one that ________.

(Multiple Choice)
4.7/5
(68)

Stacks are known as ________ data structures.

(Multiple Choice)
4.8/5
(88)

Method calls cannot be distinguished by ________.

(Multiple Choice)
4.9/5
(86)

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
(82)

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.9/5
(83)

Which of the following statements is false?

(Multiple Choice)
4.9/5
(77)

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

(Multiple Choice)
4.8/5
(70)

A static method can ________.

(Multiple Choice)
4.9/5
(79)

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

(Multiple Choice)
4.9/5
(94)

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

(Multiple Choice)
4.8/5
(72)

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

(Multiple Choice)
4.9/5
(78)

Overloaded methods always have the same _________.

(Multiple Choice)
4.8/5
(97)

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
(81)

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.7/5
(78)
Showing 1 - 20 of 38
close modal

Filters

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