JAVA QUESTION 1 The value returned by a value-returning method can be saved for
ID: 3713851 • Letter: J
Question
JAVA
QUESTION 1
The value returned by a value-returning method can be saved for further calculation in the program.
True
False
QUESTION 2
To use a predefined method you must know the code in the body of the method.
True
False
QUESTION 3
A formal parameter is a variable declared in the method heading (ie. it's signature).
True
False
QUESTION 4
A local identifier is an identifier that is declared within a method or block and that is visible only within that method or block.
True
False
QUESTION 5
No two methods in the same class can have the same name.
True
False
QUESTION 6
Void methods have no return type.
True
False
QUESTION 7
The return statement must be the last line of the method.
True
False
QUESTION 8
When a program executes, the first statement to execute is always the first statement in the main method.
True
False
QUESTION 9
Given the method heading
public static String exampleMethod(int n, char ch)
what is the return type of the value returned?
int
char
String
Nothing will be returned
QUESTION 10
The method toString() is used to convert an object to a String object.
True
False
int
char
String
Nothing will be returned
Explanation / Answer
1) True 2) False 3) True 4) True 5) False 6) True 7) False 8) False 9) String 10) True
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.