Ask Question
26 September, 14:26

What error, if any, is in the following code?

public class Test {

private int num;

private void setNum (int n) {

num = n;

}

}

a. setNum should have no parameter.

b. setNum must be public.

c. setNum should return int, not void.

d. Code is correct as is.

+1
Answers (1)
  1. 26 September, 16:26
    0
    Shajsjsjsjsisisiaisisi
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “What error, if any, is in the following code? public class Test { private int num; private void setNum (int n) { num = n; } } a. setNum ...” in 📘 Computers and Technology 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