Question: Question 2 public static double area(double radius ) { ... In the method header above, radius is called a __?__ Answer: Question 5 To be
| Question 2 |
public static double area(double radius) { ...
In the method header above, radius is called a __?__
| Answer: |
| Question 5 |
To be capable of being called in the main method of a Java program, a method defined in the same class must have the __?__ modifier.
| Answer: |
| Question 7 |
2. public static void main(String[ ] args) {
3. int number = 10;
4. doubleNum(number);
5. System.out.println(number);
6. }
7. public static void doubleNum(int n) {
8. System.out.println(n * 2);
9. }
What is printed by line 5 above?
| Answer: |
| Question 8 |
Identify the true statements about overloaded methods. Select ALL that apply.
Question options:
|
| they can have a different number of parameters |
|
| they must have the same method name |
|
| they must have different modifiers |
|
| they can have different parameter types |
|
| they can have different return types |
| Question 9 |
What term describes a variable that is declared inside a method?
Question options:
|
| parameter |
|
| instance variable |
|
| argument |
|
| local variable |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
