Exam 6: Methods: a Deeper Look

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

Which of these statements best defines scope?

(Multiple Choice)
4.9/5
(35)

Math static method random generates a random double value in the range from 0.0

(Multiple Choice)
4.7/5
(41)

Any field declared with keyword ________ is constant.

(Multiple Choice)
4.8/5
(34)

The identifiers in an enumeration ________.

(Multiple Choice)
4.8/5
(39)

A Java class can have which of the following methods? a)void foo(int a) b)void foo(int a,int b) c)void foo(double a) d)void foo(double a,double b) e)void foo(int b)

(Multiple Choice)
4.9/5
(33)

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

(Multiple Choice)
4.7/5
(46)

6)3 Q7: Declaring main as static allows the JVM to invoke main ________.

(Multiple Choice)
4.8/5
(33)

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.

(Multiple Choice)
4.8/5
(33)

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

(Multiple Choice)
4.9/5
(49)

A well-designed method ________.

(Multiple Choice)
4.8/5
(27)

Which of the following statements is false?

(Multiple Choice)
4.9/5
(33)

Which of the following statements describes block scope?

(Multiple Choice)
5.0/5
(37)

In a class containing methods with the same name,the methods are distinguished by ________.

(Multiple Choice)
4.9/5
(28)

An overloaded method is one that ________.

(Multiple Choice)
4.9/5
(34)

Variables should be declared as fields only if ________.

(Multiple Choice)
4.7/5
(30)

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

To declare a method as static,place the keyword static before ________ in the method's declaration.

(Multiple Choice)
4.8/5
(29)

Which of the following statements is false?

(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
(33)
Showing 21 - 39 of 39
close modal

Filters

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