Deck 7: Multidimensional Arrays

Full screen (f)
exit full mode
Question
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
Use Space or
up arrow
down arrow
to flip the card.
Question
Analyze the following code: <strong>Analyze the following code:  </strong> 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. <div style=padding-top: 35px>

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.
Question
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
Question
What is Math.rint(3.5)? A. 3
B) 5.0
C) 4
D) 3.0
E) 4.0
Question
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
Question
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.
Question
Suppose 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<div style=padding-top: 35px> 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
Question
  __________. A. between 'a' and 'y' B) between 'b' and 'z' C) between 'b' and 'y' D) between 'a' and 'z'<div style=padding-top: 35px> __________. A. between 'a' and 'y'
B) between 'b' and 'z'
C) between 'b' and 'y'
D) between 'a' and 'z'
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/8
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
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
2
Analyze the following code: <strong>Analyze the following code:  </strong> 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
A
4
What is Math.rint(3.5)? A. 3
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
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.
Unlock Deck
Unlock for access to all 8 flashcards in this deck.
Unlock Deck
k this deck
7
Suppose 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 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
Unlock Deck
Unlock for access to all 8 flashcards in this deck.
Unlock Deck
k this deck
8
  __________. A. between 'a' and 'y' B) between 'b' and 'z' C) between 'b' and 'y' D) between 'a' and 'z' __________. A. between 'a' and 'y'
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
locked card icon
Unlock Deck
Unlock for access to all 8 flashcards in this deck.