Computer Applications
Answer
Byte Code & JVM
Reason — Java's platform independence is due to Bytecode and JVM:
- Bytecode — Java programs are compiled into an intermediate code called Bytecode using the Java compiler. Bytecode is platform-independent and can run on any machine.
- Java Virtual Machine (JVM): — The JVM is platform-specific software that interprets or compiles Bytecode into native machine code for the underlying operating system. This allows the same Bytecode to run on any platform making Java platform independent.
Related Questions
Read the following text and choose the correct answer:
BlueJ version is a menu driven approach for Java programming. It allows the users to carry out different tasks by clicking the options available on the menu bar.
Which is the most suitable statement for BlueJ from the following?
- It is a window based platform.
- It is a DOS based platform.
- It is a window based and DOS based platform.
- Every task is performed by typing the commands on the screen.
James Gosling developed Java programming language.
Assertion (A): In Java, when you declare a class, it displays a sample program for the user.
Reason (R): You cannot write a Java program without the use of a sample program.
Based on the above discussion, choose an appropriate statement from the options given below:
- Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A).
- Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion(A).
- Assertion (A) is true and Reason (R) is false.
- Assertion (A) is false and Reason (R) is true.