Ask Question
16 June, 23:21

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. 16 June, 23:47
    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?
Find 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 you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers