In a @return tag statement the description
A. Describes the return value
B. Must be longer than one line
C. Cannot be longer than one line
D. Describes the parameter values
Describes the return value
Which of the following is not part of a method call?
A. Return type
C. Method name
D. All of the above are part of a method call
This type of method method performs a task and sends a value back to the code that called it.
When an object, such as a String, is passed as an argument, it is
A. Passed by value like any other parameter value
B. Actually a reference to the object that is passed
D. Necessary to know exactly how long the string is when writing the program
Actually a reference to the object that is passed
The header of a value-returning method must specify this.
A. The method's local variable name
B. The data type of the return value
C. The name of the variable in the calling program that will receive the returned value
D. All of the above
The data type of the return value
public static int minimum(int x, int y)
if (x < y)
smaller = x;
smaller = y;
Which of the following is a valid call to the method above?
1. minimum(int x, int y);
2. minimum(int 5, int 4);
3. minimum(5, 4);
4. public static int minimum(5, 4);
public class ScopeRules //Line 1
static final double rate = 10.50;
static int z;
static double t;
public static void main(Stringargs) //Line 7
double x, z;
// main block...
public static void one(int f, char g) //Line 15
// block one...
public static int w; //Line 20
public static void two(int one, int i) //Line 22
int a; //Line 25
int x = 12; //Line 29
}//end block three
// block two... //Line 32
Where is identifier x (block three's local variable) visible?
1. In two and block three
2. In block three and main
3. In block three only
4. In one and block three
In block three only
public static String exampleMethod(int n, char ch)
Based on the method heading above, what is the return type of the value returned?
4. Nothing will be returned