Exam 6: Methods: a Deeper Look

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

Which of the following statements describes block scope?

(Multiple Choice)
4.8/5
(37)

Which statement is false?

(Multiple Choice)
4.9/5
(47)

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

(Multiple Choice)
4.9/5
(33)

Stacks are known as ________ data structures.

(Multiple Choice)
4.8/5
(33)

When an object is concatenated with a String:

(Multiple Choice)
4.8/5
(33)

A static method can ________.

(Multiple Choice)
4.8/5
(42)

Which statement below could be used to simulate the outputs of tossing a quarter to get heads or tails? Suppose randomNumbers is a Random object.

(Multiple Choice)
4.8/5
(31)

Any field declared with keyword ________ is constant.

(Multiple Choice)
4.7/5
(41)

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 ){ … }

(Multiple Choice)
4.7/5
(43)

An overloaded method is one that

(Multiple Choice)
4.7/5
(40)

You can set a Random object's seed at any time during program execution by calling the object's ________ methods.

(Multiple Choice)
4.7/5
(40)

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

(Multiple Choice)
4.8/5
(35)

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

(Multiple Choice)
4.9/5
(37)

Programs designed for maintainability are constructed from small simple pieces or modules.Modules in Java are called:

(Multiple Choice)
4.7/5
(32)

Which of the following methods is not in the Math class?

(Multiple Choice)
4.7/5
(28)

Which of these statements best defines scope?

(Multiple Choice)
4.8/5
(35)

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

(Multiple Choice)
4.8/5
(37)

Identifiers in Java have ________ and ________ scopes?

(Multiple Choice)
4.9/5
(41)

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

(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.9/5
(43)
Showing 21 - 40 of 42
close modal

Filters

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