subject

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.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 13:10
What is domain name system (dns)? allows dynamic ip address allocation so users do not have to have a preconfigured ip address to use the network converts ip addresses into domains, or identifying labels that use a variety of recognizable naming conventions the efficient coexistence of telephone, video, and data communication within a single network, offering convenience and flexibility not possible with separate infrastructures the integration of communication channels into a single service
Answers: 2
question
Computers and Technology, 23.06.2019 17:30
Scientists have changed the model of the atom as they have gathered new evidence. one of the atomic models is shown below. what experimental evidence led to the development of this atomic model from the one before it? a few of the positive particles aimed at a gold foil seemed to bounce back. the colors of light emitted from heated atoms had very specific energies. experiments with water vapor showed that elements combine in specific proportions. cathode rays were bent in the same way whenever a magnet was brought near them.
Answers: 2
question
Computers and Technology, 24.06.2019 02:30
Which option completes the explanation for conflict of interest in an organization
Answers: 1
question
Computers and Technology, 25.06.2019 05:30
Why are weather forecasts more reliable now compared of hundred years ago
Answers: 1
You know the right answer?
What error, if any, is in the following code?

public class Test {
private int nu...
Questions
question
Mathematics, 17.12.2019 05:31
Questions on the website: 13722361