Timing code in Java

For timing your code in Java you can use method currentTimeMillis() of class System (http://java.sun.com/j2se/1.3/docs/api/java/lang/System.html) By reading current time "before and after" and then computing the difference you will see how long it took in milliseconds to execute the portion of the code. This will be absolute time and is fine for the purpose of this excecise. You may also choose to use your operating system means to record CPU time. return home
ungar@cis.upenn.edu