Ask Question
3 March, 17:40

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.

+4
Answers (1)
  1. 3 March, 19:11
    0
    Shajsjsjsjsisisiaisisi
Know the Answer?
Not Sure About the Answer?
Get 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 & Technology 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