Question
package maxsumtest; import java.util.Scanner public class ExecutionTimer { private long startTime; private long endTime; public void start() { startTime = System.currentTimeMillis(); } public void end()
package maxsumtest; import java.util.Scanner
public class ExecutionTimer { private long startTime; private long endTime;
public void start() { startTime = System.currentTimeMillis(); }
public void end() { endTime = System.currentTimeMillis(); }
public long duration(){ return (end-start); } public void reset() { start = 0; start = 0; }
public void print() { System.out.println("Execution Time:" + duration()+" milliseconds"); }
}
------------------------------------
maxSumTest.java:29: error: cannot find symbol ExecutionTimer executionTimer = new ExecutionTimer(); ^ symbol: class ExecutionTimer location: class maxSumTest maxSumTest.java:29: error: cannot find symbol ExecutionTimer executionTimer = new ExecutionTimer(); ^ symbol: class ExecutionTimer location: class maxSumTest maxSumTest.java:30: error: cannot find symbol ExecutionTimer executionTimer2 = new ExecutionTimer(); ^ symbol: class ExecutionTimer location: class maxSumTest maxSumTest.java:30: error: cannot find symbol ExecutionTimer executionTimer2 = new ExecutionTimer(); ^ symbol: class ExecutionTimer location: class maxSumTest maxSumTest.java:31: error: cannot find symbol ExecutionTimer executionTimer3 = new ExecutionTimer(); ^ symbol: class ExecutionTimer location: class maxSumTest maxSumTest.java:31: error: cannot find symbol ExecutionTimer executionTimer3 = new ExecutionTimer(); ^ symbol: class ExecutionTimer location: class maxSumTest 6 errors?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started