Ask Question
20 August, 03:09

Suppose you have the following function prototype and variable declaration: public void goop (int[ ] z) int[ ] x = new int[10]; Which is the correct way to call the goop method with x as the argument:

(A) goop (x);

(B) goop (x[ ]);

(C) goop (x[10]);

(D) goop (&x);

(E) goop (&x[ ]);

+5
Answers (1)
  1. 20 August, 03:27
    0
    A) goop (x);

    Explanation:

    A method in Java is a collection of statements that perform some specific task and return the result to the caller. A method can perform some specific task without returning anything. Methods allow us to reuse the code without retyping the code.

    In the defined method below:

    public void goop (int[ ] z)

    int[ ] x = new int[10];

    the correct way to call the goop method will be to put the argument x in the parenthesis.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Suppose you have the following function prototype and variable declaration: public void goop (int[ ] z) int[ ] x = new int[10]; Which is ...” in 📙 Engineering if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers