Introduction to Java MCQs Exercise II

Ques 1 Introduction


JRE Stands for_____?

A Java Running Engine
B Java Running Environment
C Just Runtime Environment
D Java Runtime Environment

The Java Runtime Environment (JRE) provides the necessary libraries and JVM to run Java applications.

Ques 2 Introduction


What makes java platform independent?

A Object Oriented Programming Language
B It support Multi -threading
C It is Advanced Programming Language
D Java uses bytecode of execution

Java is platform independent because it compiles code into bytecode, which can be executed on any system with a Java Virtual Machine (JVM). This allows Java programs to run on any device or operating system without modification.

Ques 3 Introduction


Which method executes first in Java Programming?

A first method
B last method
C main() method
D both (b) and (c)

The main() method is the entry point of any Java program. When a Java application is executed, the JVM calls the main() method first to start the program.

Ques 4 Introduction


Which environment variable is used to set the path in Java?

A path
B JAVA_PATH
C JAVA_HOME
D HOME

The JAVA_HOME environment variable is used to specify the directory where the JDK is installed. It helps in setting the path for Java-related tools and libraries.