Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Void methods use the return statement to return the value 0. False 2. An actu

ID: 3839313 • Letter: 1

Question

1. Void methods use the return statement to return the value 0.

False

2. An actual parameter is a variable or expression listed in a method call.

3. Actual and formal parameters have a one-to-one correspondence.

4. Void methods must have at least one parameter.

5. Just like the nesting of loops, Java allows the nesting of methods (declare methods within a method).

6. A local identifier is an identifier that is declared within a method or block and that is visible only within that method or block.

7. The reserved word static specifies that the value stored in the identifier is fixed and cannot be changed.

8. In Java, new is an operator that causes the system to allocate memory space of a specific type, store specific data in that memory space, and return the address of the memory space.

9. An actual parameter is a variable declared in a method heading.

10. When a method executes, any changes made to the formal parameter(s) of a primitive data type do not affect the actual parameter(s) in any way.

11. Formal parameters of the primitive data types can pass information outside the method.

12. Reference variables can be passed as parameters to methods and returned as method values.

13. All the elements of an array are of the same data type.

14. Because an array is an object, the array variable arrayName is a reference variable.

15. The return statement must be the last line of the method.

True

Explanation / Answer

1. Void methods use the return statement to return the value 0.

Ans: False.

Without mentioning any return value Return works a lot like break in a loop and simply exits the code in question.In void we can use return statement to break loop.

2. An actual parameter is a variable or expression listed in a method call.

Ans: True

3. Actual and formal parameters have a one-to-one correspondence.

Ans: True.

One-to-one correspondence must occur among the actual and formal parameters. That means the first actual parameter must correspond to the first formal parameter and so on

4. Void methods must have at least one parameter.

Ans: False.

5.Just like the nesting of loops, Java allows the nesting of methods (declare methods within a method).

Ans: False.

6. A local identifier is an identifier that is declared within a method or block and that is visible only within that method or block.

Ans: False.

7.The reserved word static specifies that the value stored in the identifier is fixed and cannot be changed.

Ans: False.

The reserved word Final specifies that the value stored in the identifier is fixed and cannot be changed.

8. In Java, new is an operator that causes the system to allocate memory space of a specific type, store specific data in that memory space, and return the address of the memory space.

Ans: True.

9.  An actual parameter is a variable declared in a method heading.

Ans: False.

Farmal parameter is a variable declared in a method heading.

10.When a method executes, any changes made to the formal parameter(s) of a primitive data type do not affect the actual parameter(s) in any way

Ans: True.

11.Formal parameters of the primitive data types can pass information outside the method.

Ans: False.

formal parameters of the primitive data types cannot pass information outside the method.

12.  Reference variables can be passed as parameters to methods and returned as method values.

Ans: True.

13.All the elements of an array are of the same data type.

Ans: True.

Array is the collections of elements whhichh are of same data types.

14. Because an array is an object, the array variable arrayName is a reference variable.

15. . The return statement must be the last line of the method.

Ans: False

Ans: True

3. Actual and formal parameters have a one-to-one correspondence.