18-Sep-2020
How long does a line of Java code execute?
You may wonder how long a particular line of Java code executes. If this line is part of your code, it’s easy to find out by putting
[read more]
System.currentTimeMillis() calls before and after the line and finding the difference. But what if this line of code is part of a library or a framework? You could use a profiler, but a quicker and easier way might be to use breakpoints in IDEA.