Deck 7: Multidimensional Arrays
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/8
Play
Full screen (f)
Deck 7: Multidimensional Arrays
1
When you invoke a method with a parameter, the value of the argument is passed to the parameter. This is referred to as _________. A. pass by name
B) pass by value
C) pass by reference
D) method invocation
B) pass by value
C) pass by reference
D) method invocation
B
2
Analyze the following code: 
A) The program displays int followed by 5.
B) The program displays long followed by 5.
C) The program runs fine but displays things other than 5.
D) The program does not compile.

A) The program displays int followed by 5.
B) The program displays long followed by 5.
C) The program runs fine but displays things other than 5.
D) The program does not compile.
D
3
A variable defined inside a method is referred to as __________. A. a local variable
B) a block variable
C) a global variable
D) a method variable
B) a block variable
C) a global variable
D) a method variable
A
4
What is Math.rint(3.5)? A. 3
B) 5.0
C) 4
D) 3.0
E) 4.0
B) 5.0
C) 4
D) 3.0
E) 4.0
Unlock Deck
Unlock for access to all 8 flashcards in this deck.
Unlock Deck
k this deck
5
The signature of a method consists of ____________. A. method name and parameter list
B) return type, method name, and parameter list
C) parameter list
D) method name
B) return type, method name, and parameter list
C) parameter list
D) method name
Unlock Deck
Unlock for access to all 8 flashcards in this deck.
Unlock Deck
k this deck
6
Which of the following should be declared as a void method? A. Write a method that returns a random integer from 1 to 100.
B) Write a method that prints integers from 1 to 100.
C) Write a method that checks whether current second is an integer from 1 to 60.
D) Write a method that converts an uppercase letter to lowercase.
B) Write a method that prints integers from 1 to 100.
C) Write a method that checks whether current second is an integer from 1 to 60.
D) Write a method that converts an uppercase letter to lowercase.
Unlock Deck
Unlock for access to all 8 flashcards in this deck.
Unlock Deck
k this deck
7
Suppose
What is the printout of the call nPrint('a', 4)? A. aaaaa
B) aaaa
C) invalid call, because 'a' is a character, not a string.
D) aaa

B) aaaa
C) invalid call, because 'a' is a character, not a string.
D) aaa
Unlock Deck
Unlock for access to all 8 flashcards in this deck.
Unlock Deck
k this deck
8

B) between 'b' and 'z'
C) between 'b' and 'y'
D) between 'a' and 'z'
Unlock Deck
Unlock for access to all 8 flashcards in this deck.
Unlock Deck
k this deck