题目内容

Arguments to methods always appear within __________.

A. parentheses
B. quotation marks
C. curly braces
D. brackets

查看答案
更多问题

If a method does not contain any parameters, you must invoke it with a pair of empty parentheses.

A. false
B. true

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. method invocation
D. pass by reference

The actual parameters of a method must match the formal parameters in type, order, and number.

A. true
B. false

Given the following method static void nPrint(String message, int n) {while (n > 0) {System.out.print(message);n--;} }

A. r> What is k after invoking nPrint("A message", k)? int k = 2; nPrint("A message", k);
B. 2
C. 0
D. 1
E. 3

答案查题题库