hiiii

is their any special functin available to calculate the execution time of a program written in java.??

thanks in advance..

System.currentTimeMillis(); It returns the current time in milliseconds. So you can call this method before the java method you want to count and then call it again and get the difference

If it is profiling that you need to do on your program/application and not only the overall time required for execution, I would suggest you to use the profiling tool accompanied with modern day IDEs such as NetBeans. But if it is just the overall execution time that you require more of a ballpark then what javaAddict mentions should more than suffice your need.

Mark the thread as solved if it is.