The JIT is the JVM’s mechanism by which it can optimize code at runtime.
JIT means Just In Time. It is a central feature of any JVM. Among other optimizations, it can perform code inlining, lock coarsening or lock eliding, escape analysis etc.
The main benefit of the JIT is on the programmer’s side: code should be written so that it just works; if the code can be optimized at runtime, more often than not, the JIT will find a way.
(On a more advanced note: the JIT is such a complex piece of machinery that it makes it complicated to do accurate performance benchmarks for JVM code; this is why such frameworks as JMH exist.)
|What are Reflections?|
|What does the following code usually output? And why usually?|
|Where would you use LinkedList and where an ArrayList?|
|Identify the Autoboxing and the Unboxing in the following example:|
|What is Auto-boxing and Unboxing, and does it impact performance?|
|Primitive vs Object types?|
|What is the parent class that every other class extends from?|
|Why is Java said to be 'write once, run everywhere'?|
|What are static methods and fields?|
|What is JPA and how is it different from JDBC?|
|What is the difference between an Application server and servlet container?|
|Given the following example code, which overrides are valid and which one aren't (with explanation)?|
|What types of Exceptions exist in Java (and what is the difference)? Name few common Exceptions of each type.|
|What are default methods?|
|Why are exceptions expensive in Java?|
|What is the problem with the following example and does it compile?|
|What are generics in Java?|
|What's the difference between a HashSet and a LinkedHashSet?|
|What's the synchronized version of a HashMap?|
|What's the difference between StringBuilder and StringBuffer?|