Multiple choice technology web 2.0

By default, when does the JIT compiler usually compile a method?

  1. When the developer packages the application

  2. When the application loads

  3. The first time it is called

  4. When the application is installed

  5. Each time it is called

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

JIT (Just-In-Time) compilation occurs on-demand - when a method is first invoked at runtime. The method is converted from IL to native code immediately before its first execution, then cached for subsequent calls. This is the core 'just-in-time' concept - compiling right when it's needed.

AI explanation

The Just-In-Time (JIT) compiler defers compiling a method's IL into native machine code until that method is actually invoked for the first time, rather than compiling the whole assembly upfront; subsequent calls reuse the already-compiled native code for better performance.