JAVA JVM Sample Questions Interview Questions

Dear Reader, Below are four questions on JVM or Java Virtual Machine. Having being considered the basics, questions can be expected on these topics during technical interviews. Please don't for got to leave a comment about this post.

Question 1

Can you tell the reason why JVM implementation is different and specific to different platforms (operating systems) ?

Answer :

As you all know JAVA is extremely popular for its portability (write once execute anywhere). This functionality is achieved as JAVA bytecode runs on any platform without any changes to it.(Such portability cannot be achieved on native codes of languages like C, C++). Now, JVM is the component that takes care that same bytecode is run on every machine. Yes, to make this portability a possibility, JVM is quite different for every platform/operating system. Hence, in simple terms, it is only with the help of platform specific JVM that bytecode enjoys the luxury of being platform independent as JVM takes care of platform specific internals.

Question 2

Can you tell me an use of Bytecode Verifier ?

Answer :

Bytecode Verifier is a component that is aimed at preventing harmful code that can intentionally/unintentionally lead to system crash. It can be thought of as a layer of check before execution of bytecode.

Question 3

What are JAVA applets and does they require JVM to get executed ?

Answer :

JAVA applets are java programs that execute on user browsers. Browsers have the capability to execute them utilizing JVM.

Question 4

If a company invents a new OS (Operating System) and likes JAVA programs to execute on their OS, what they should ensure as a basic requirement ?

Answer :

To execute JAVA programs on a newly developed OS, the respective company should ensure that a JVM is developed specific to their OS.

Post a Comment

Please Select Embedded Mode To Show The Comment System.*

Previous Post Next Post