subject

Ania has written this SimpleStopwatch class. In which line is she measuring the elapsed time? public class SimpleStopwatch
{
private long startingTime, endingTime;

public SimpleStopwatch()
{
startingTime = System. currentTimeMillis();
endingTime = System. currentTimeMillis();
}

public void start()
{
startingTime = System. currentTimeMillis();
return;
}

public void stop()
{
endingTime = System. currentTimeMillis();
return;
}

public long getDuration()
{
return endingTime - startingTime;
}
}

A. private long startingTime, endingTime;
B. startingTime = System. currentTimeMillis();
C. endingTime = System. currentTimeMillis();
D. startingTime = System. currentTimeMillis();
E. return endingTime - startingTime;

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:00
Jackson is teaching the decimal number system. he wants his students to know how to expand numbers by powers of 10. which is the correct order in which digits are assigned values in the decimal number system?
Answers: 1
question
Computers and Technology, 23.06.2019 06:40
What are the three uses of a screw?
Answers: 2
question
Computers and Technology, 23.06.2019 10:00
Whats three fourths of 15(this is supposed to be in math but i clicked too fast)
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
2. fluorine and chlorine molecules are blamed fora trapping the sun's energyob forming acid rainoc producing smogod destroying ozone molecules
Answers: 2
You know the right answer?
Ania has written this SimpleStopwatch class. In which line is she measuring the elapsed time? publi...
Questions
question
Mathematics, 23.03.2021 17:50
question
Physics, 23.03.2021 17:50
question
Computers and Technology, 23.03.2021 17:50
question
Mathematics, 23.03.2021 17:50
Questions on the website: 13722363