Question library
Questions from real interviews. Drill any of them by voice in a couple of minutes, with an interviewer, a score and feedback.
What happens to Java code from the moment you write it to the moment it runs? And what is a JIT compiler?JuniorA colleague wrote a microbenchmark: they call a method in a loop and measure the time with System.nanoTime. The results jump around, and the first runs are noticeably slower. Why does this happen, and how do you measure it properly?Mid-levelTell me how JIT compilation works in HotSpot and what optimizations it performs. How does that affect the way you write and measure performance-critical code?Senior