MCQ: Which of the following option leads to the portability and security of Java?

Which of the following option leads to the portability and security of Java?

  1. Bytecode is executed by JVM
  2. The applet makes the Java code secure and portable
  3. Use of exception handling
  4. Dynamic binding between objects

Answer

a. Bytecode is executed by JVM

Explanation:

The output of the Java compiler is bytecode, which leads to the security and portability of the Java code. It is a highly developed set of instructions that are designed to be executed by the Java runtime system known as Java Virtual Machine (JVM). 

The Java programs executed by the JVM make the code portable and secure. Because JVM prevents the code from generating its side effects. The Java code is portable, as the same byte code can run on any platform.

Hence, the correct answer is an option (a).

Comments