filmov
tv
How not to answer in interview #4 Is Java compiled or interpreted? #shorts #javaprogramming

Показать описание
In this short we explain how not to answer in Java interview when questioned about Is Java compiled or interpreted? #shorts #javaprogramming
Generally freshers assume Java to be a compiled language only because it generates a .class file after compilation but its not the complete answer, Java is also an interpreted language as it makes usage of Just-In-Time(JIT) compiler which interprets the bytecode dynamically to optimize the performance. This compilation occurs on-the-fly during the execution of the program, targeting specific sections of code that are frequently executed.
So, in summary, Java source code is compiled into bytecode, which is then interpreted by the JVM. Additionally, the JVM may use a JIT compiler to further optimize the execution by compiling bytecode into machine code. This combination of compilation and interpretation allows Java to achieve both platform independence and performance.
Tell in comment section What is your way of giving correct answer?
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Subscribe to our channel and press the bell icon to get regular updates:
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
📌 Social Media
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Copyright © 2023 ScaleUp India - All Rights Reserved
Generally freshers assume Java to be a compiled language only because it generates a .class file after compilation but its not the complete answer, Java is also an interpreted language as it makes usage of Just-In-Time(JIT) compiler which interprets the bytecode dynamically to optimize the performance. This compilation occurs on-the-fly during the execution of the program, targeting specific sections of code that are frequently executed.
So, in summary, Java source code is compiled into bytecode, which is then interpreted by the JVM. Additionally, the JVM may use a JIT compiler to further optimize the execution by compiling bytecode into machine code. This combination of compilation and interpretation allows Java to achieve both platform independence and performance.
Tell in comment section What is your way of giving correct answer?
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Subscribe to our channel and press the bell icon to get regular updates:
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
📌 Social Media
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Copyright © 2023 ScaleUp India - All Rights Reserved
Комментарии